Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果我执行一个 jar:
java -jar foo.jar
并在其清单的属性中foo.jar声明依赖,清单中定义的罐子是否会添加到类路径中?bar.jarClass-Pathbar.jar
foo.jar
bar.jar
Class-Path
MANIFEST.MF包含foo.bar:
MANIFEST.MF
foo.bar
Class-Path: bar.jar
MANIFEST.MF包含bar.bar:
bar.bar
Class-Path: baz.jar
运行时是否baz.jar添加到类路径中java -jar foo.jar?
baz.jar