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
  • 69,531
  • 19
  • 142
  • 174
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
  • 250,062
  • 96
  • 490
  • 643