I am developing a GWT application on my Mac and now I'm supposed to test it in IE on my PC.
However, I don't want to copy the codes to PC in order to rebuild the project and finally to test it.
Nor do I want to setup the whole Apache + Tomcat server on my Mac to deploy the project so that my PC can access that web application.
Is there any way I can run my GWT application in debug mode on my Mac, and just test it out in IE on my PC? I'm using Spring + Maven + Eclipse + GWT.
Right click on the project in Eclipse, go to its Run Configurations window, and create a new "Java Application", name it something like "GWT Super Dev Mode". While in the Run Configurations window, do the following: Set the project based on your project name, and type in the main class as com. google.
Using GWT Development Mode will launch the CodeServer and a embedded Jetty web server by default. There will start two servers, the first being the Jetty web server and the CodeServer which will listen for compile requests from the browser.
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.
In your run configuration of eclipse use -bindAddress 0.0.0.0 and this allow jetty to receive traffic from outside localhost.
In the Eclipse menu
From there you can debug from a remote machine in Development Mode
set -bindAddress 0.0.0.0 in (x)=Arguments tab in "Run Configuration" as stated above. when you run your application GWT will use your computer IP in launch URL. after opening the URL in your browser, click on GWT toolbox on the right of Chrome address bar which will open "GWT Developer Plugin Options". now just add your IP to the list of webserver exceptions.
See Debug GWT application in a remote browser.
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