jdeps返回“找不到”

问题描述 投票:0回答:1

我正在关注此tutorial,它试图通过构建最小的JVM来最小化JVM的内存占用。

[当我运行jdeps -s myjar.jar时,我得到:

myjar.jar -> java.base
myjar.jar -> java.logging
myjar.jar -> not found

在本教程中,他通过运行另一个命令解决了这个问题。

jdeps -cp 'lib/*' -recursive -s myjar.jar

我尝试了这个,但是得到了相同的结果。

如何正确运行?

java java-11 jdeps
1个回答
1
投票

对于Maven项目,您可以这样做:

  1. 运行mvn dependency:build-classpath
  2. 复制maven-dependency-plugin的输出(“ Dependencies classpath:”之后的行)
  3. 运行jdeps -cp <paste output here> -s -recursive myjar.jar
© www.soinside.com 2019 - 2024. All rights reserved.