I have a jar called GameClient.jar which has a main method. And I have a json.jar which does contain an org/json/JSONException.class
Both of these are in the dist folder.
I run the following
java -classpath dist/json.jar -jar dist/gameclient.jar
Not really sure why I still get
Exception in thread "main" java.lang.NoClassDefFoundError: org/json/JSONException
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.getMethod0(Unknown Source)
at java.lang.Class.getMethod(Unknown Source)
at sun.launcher.LauncherHelper.getMainMethod(Unknown Source)
at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.json.JSONException
I am on Windows XP and Java 1.7. I get the same error with or without the classpath option.