Reputation: 2570
I'm following this tutorial which tries to minimize the JVM memory footprint by building a minimal JVM.
When I'm running jdeps -s myjar.jar
I'm getting:
myjar.jar -> java.base
myjar.jar -> java.logging
myjar.jar -> not found
In the tutorial he solves this by running another command.
jdeps -cp 'lib/*' -recursive -s myjar.jar
I tried this but I'm getting the same result.
How to run it correctly?
Upvotes: 4
Views: 4138
Reputation: 842
It is due to Bug in Jdeps and has been the same since JDK 8 at least.
You can see the actual Path parser checks if the -cp/-classpath argument list contains "dir/.*" format and not "dir/*" format as advertised by the docs, examples and the API's javadoc.
Upvotes: 1
Reputation: 39536
For a Maven project, you can do it like this:
mvn dependency:build-classpath
jdeps -cp <paste output here> -s -recursive myjar.jar
Upvotes: 9