0

I am trying to run a Java executable through the command line.

First I go to the directory the executable is located at and execute the following:

java -cp .;JARNAME-0.0.1-SNAPSHOT.jar main.class.name

This is a packaged jar so it does not have any .class files.

However, this command sporadically throws the Error: Could not find or load main class main.class.package.name error message.

Does anyone have any suggestions to get to the bottom of this?

Thanks

czchlong
  • 2,434
  • 10
  • 51
  • 65

1 Answers1

0

Last argument is class name, not package name

talex
  • 17,973
  • 3
  • 29
  • 66