No output with jdeps when using -jdkinternals

独自空忆成欢 提交于 2020-01-03 20:46:07

问题


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?


回答1:


This means the jar does not use any JDK internal packages

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).



来源:https://stackoverflow.com/questions/39518113/no-output-with-jdeps-when-using-jdkinternals

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!