I am trying to use the Java Dependency Analysis Tool (jdeps). First I tried to do it with no arguments like so:
jdeps myJar.jar
It lists the dependencies that it uses. So far so good.
org.example (myJar.jar)
-> java.io
-> java.lang
-> java.text
-> java.util
[...]
However, the biggest reason to use jdeps
is to detect dependencies on packages that will not be accessible in Java 9 (e.g. sun.*
packages). So I try to use the -jdkinternals
flag, which checks for these incompatibilities. Thus my command is:
jdeps -jdkinternals myJar.jar
However, there is no output when I run this. Does this mean that it failed to run? What am I missing?
Running jdeps -jdkinternals
and getting no output means that jdeps
did not find any JDK internal packages. You can verify this by running jdeps
without -jdkinternals
and looking at all of the listings of dependency packages. None of them will be internal ones.
It would probably be nicer for it to print "Found no JDK internal dependencies" to prevent confusion like this from happening. Still, know that no output means that there is nothing to worry about, so celebrate the fact that you won't have any issues when you use Java 9 (for this reason, anyway).