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,354
  • 10
  • 48
  • 63

1 Answers1

0

Last argument is class name, not package name

talex
  • 16,886
  • 2
  • 27
  • 60