I’m trying to run a jar, gwt-codeserver.jar, in OSX.7, with the command
java -cp ".:/sdk/gwt-2.5.0.rc1/gwt-dev.jar" -jar /sdk/gwt-2.5.0.rc1/gwt-codeserver.jar com.activegrade.TeacherView
The command fails with:
Exception in thread "main" java.lang.NoClassDefFoundError: com/google/gwt/core/ext/TreeLogger
Caused by: java.lang.ClassNotFoundException: com.google.gwt.core.ext.TreeLogger
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
...
But gwt-dev.jar contains the definition for com.google.gwt.core.ext.TreeLogger, so I’ve concluded that I’m not properly setting the classpath here.
Am I setting the classpath correctly? The jar file is definitely the right jar and it’s definitely at that location. How can I diagnose this further?
Could this be the source of your problem? “When you use the -jar option, the JAR file is the source of all user classes, and other user class path settings are ignored.”