Whenever I try to compile any of my GWT application the compilation fails with the error message "Error: Could not find or load main class com.google.gwt.dev.Compiler". This problem started after I made some changes to the path and classpath environment variables while installing Tomcat, I don't know whether these changes caused the problem. I tried to reinstall GWT plugin but all in vain. Any help would be greatly appreciated. I am using Eclipse 4.3 and GWT SDK 2.6.0.
Try Run As > Run Configurations , delete the current configuration by clicking on the X top left. Apply and close. Now, Run As > Web application . A default configuration will be created.
The heart of GWT is a compiler that converts Java source into JavaScript, transforming your working Java application into an equivalent JavaScript application. The GWT compiler supports the vast majority of the Java language. The GWT runtime library emulates a relevant subset of the Java runtime library.
Try Run As > Run Configurations
, delete the current configuration by clicking on the X top left. Apply and close. Now, Run As > Web application
. A default configuration will be created.
If you have any VM arguments, copy them before doing the steps above.
Check things as mentioned in below snapshots:
check whether Main class
is having value com.google.gwt.dev.DevMode
or not.
Go To Run Configuration >
Go To Project Properties > Build Path
Check whether GWT SDK is installed properly or not
I would recommend creating maven or ant scripts to build outside eclipse.
This way other developers in your team, that maybe don't use eclipse can also build/run the application.
set the "classpath" environment variable = %gwt_installed_dir%
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With