Case 1:
java -cp LRS3rdPartyClient.jar -jar tasks.jar
Case 2:
java -classpath LRS3rdPartyClient.jar;tasks.jar com.lombardrisk.build.WaitForServerStart
Case 1
does not execute, because a class, which resides in LRS3rdPartyClient.jar
cannot be found, whereas the Case 2
executes properly.
I'am quite confused.
When using -jar
, the classpath is ignored . Only the classpath specified in the jar file's manifest is used.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.