jdeps returns "not found"

Viewed 1804

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?

1 Answers

For a Maven project, you can do it like this:

  1. Run mvn dependency:build-classpath
  2. Copy the output of the maven-dependency-plugin (the line after "Dependencies classpath:")
  3. Run jdeps -cp <paste output here> -s -recursive myjar.jar
Related