1

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.

Sirko
  • 72,589
  • 19
  • 149
  • 183
Bond Chen
  • 168
  • 1
  • 8

1 Answers1

1

When using -jar, the classpath is ignored. Only the classpath specified in the jar file's manifest is used.

Community
  • 1
  • 1
Thilo
  • 257,207
  • 101
  • 511
  • 656