0

I have a MyProgram.jar for which I need some exernal jar-files. It is not possible to move these files, so I need to reference them. I tried:

java -cp C:\Test\MyProgram.jar;C:\OtherLocation\other.jar test.myprogram.UI

(and I need some more jars)

However, when I try this, I get the exception:
Could not find or load main class Files

The program starts if I leave out the OtherLocation, like this:
java -cp C:\Test\MyProgram.jar test.myprogram.UI
but then I'm missing libraries.

It looks like the question below, but apparently this does not work for me. What am I doing wrong?

include external jar when running java -jar

Community
  • 1
  • 1
Century
  • 249
  • 1
  • 2
  • 18

0 Answers0