In my Ant `build.xml`:
<path id="gwt.path">
<pathelement location="lib/main"/>
<fileset dir="lib/main">
<filename name="gin-2.1.2.jar"/>
<filename name="guice-3.0.0.jar"/>
<filename name="guice-assistedinject-3.0.0.jar"/>
<filename name="gwt-bootstrap-2.2.2.jar"/>
<filename name="gwt-bootstrap-sources-2.2.2.jar"/>
<filename name="gwt-dev.jar"/>
<filename name="gwt-user.jar"/>
<filename name="javax-inject-1.0.0.jar"/>
<filename name="requestfactory-apt.jar"/>
<filename name="requestfactory-client+src.jar"/>
<filename name="validation-api-1.0.0.GA.jar"/>
<filename name="validation-api-1.0.0.GA-sources.jar"/>
</fileset>
</path>
<target name="gwtc" depends="main-compile">
<java failonerror="true" fork="true"
classname="com.google.gwt.dev.Compiler">
<classpath>
<pathelement location="src/main/java"/>
<path refid="gwt.path"/>
</classpath>
<jvmarg value="-Xmx256M"/>
<arg line="-war"/>
<arg value="gen/war" />
<arg line="-logLevel"/>
<arg value="ALL"/>
<arg line="-optimize"/>
<arg value="9"/>
<arg line="-extra"/>
<arg value="gen/staging"/>
<arg line="-compileReport"/>
<arg value="net.myapp.MyModule"/>
</java>
</target>
When I run the `gwtc` target, I get:
...
[java] Exception in thread "main" java.lang.NoClassDefFoundError:
com/google/gwt/dev/Compiler
[java] Caused by: java.lang.ClassNotFoundException:
com.google.gwt.dev.Compiler
[java] at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
[java] at java.security.AccessController.doPrivileged(Native Method)
[java] at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
[java] at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
[java] at
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
[java] at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
[java] Could not find the main class: com.google.gwt.dev.Compiler.
Program will exit.
BUILD FAILED
/home/myUser/MyProject/build.xml:181: Java returned: 1
Total time: 2 seconds
What's going on here? I'm adding `gwt-dev.jar` to my `gwt.path`, which
means it should be available when the `<java>` task runs and tries to find
the `com.google.gwt.dev.Compiler`. So where am I going wrong? Thanks in
advance!
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.