Skip to main content
added 119 characters in body
Source Link
Drew Noakes
  • 313.2k
  • 174
  • 704
  • 770

Just to clarify on windows, thisThis works on Windows:-

java -cp "lib/*" %MAINCLASS%

java -cp "lib/*" %MAINCLASS% 

where MAINCLASS%MAINCLASS% of course is the class containing your main method.

Alternatively:

java -cp "lib/*" -jar %MAINJAR% 

where %MAINJAR% is the jar file to launch via its internal manifest.

Just to clarify on windows, this works :-

java -cp "lib/*" %MAINCLASS%

where MAINCLASS of course is the class containing your main method.

This works on Windows:

java -cp "lib/*" %MAINCLASS% 

where %MAINCLASS% of course is the class containing your main method.

Alternatively:

java -cp "lib/*" -jar %MAINJAR% 

where %MAINJAR% is the jar file to launch via its internal manifest.

Source Link
Chris Milburn
  • 938
  • 1
  • 12
  • 21

Just to clarify on windows, this works :-

java -cp "lib/*" %MAINCLASS%

where MAINCLASS of course is the class containing your main method.