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.