Issue
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?
Solution
For a Maven project, you can do it like this:
- Run
mvn dependency:build-classpath
- Copy the output of the maven-dependency-plugin (the line after "Dependencies classpath:")
- Run
jdeps -cp <paste output here> -s -recursive myjar.jar
Answered By - ZhekaKozlov
Answer Checked By - Clifford M. (JavaFixing Volunteer)