I have a Java
class named Client
with main(String[] args)
.
main
uses classes defined in a jar
called lib.jar
. How can I run the program from the command line passing command line argument to main
?
I tried:
java -cp lib.jar Client arg1 arg2
and got this error:
Error: Could not find or load main class Client