Developing using GWT Hosted Mode remotely

Developing using GWT Hosted Mode remotely

Lets say you are running Linux. And of course you want to support IE browsers in your GWT application. So you have tested the application in Firefox which works perfectly with the GWT Development plugin. So you’ve decided to test application in the running IE browser of the Windows guest and you observe a very strange behavior in IE.

Lets assume that initially you have the following command to run GWT application in the hosted mode:

java -Xmx512M -XX:MaxPermSize=256m -Xdebug -Xrunjdwp:transport=dt_socket,address=8786,server=y,suspend=n -cp "/home/andy/Tools/gwt-2.0.3/gwt-dev.jar:/home/andy/Tools/gwt-2.0.3/gwt-user.jar:ui/src/main/java" -startupUrl http://localhost:8080/untitled.html com.test.YourProject

So to debug the problem or just to quickly test out the changes you’ll need to follow the next steps:

  1. Replace localhost with the real IP address
    So the URL launched looks like now. But once you try to access it from the remote IE – you’ll fail because the port is closed in your firewall.
  2. Open port 9997 in your firewall. Once you try to access it – you’ll fail again because the port 9997 is bound to the, not
  3. Specify -bindAddress parameter in the command line.

As result my command line looks like:

java -Xmx512M -XX:MaxPermSize=256m -Xdebug -Xrunjdwp:transport=dt_socket,address=8786,server=y,suspend=n -cp "/home/andy/Tools/gwt-2.0.3/gwt-dev.jar:/home/andy/Tools/gwt-2.0.3/gwt-user.jar:ui/src/main/java" -startupUrl -bindAddress com.test.YourProject

And after running this script – it’s possible to debug/redeploy code running in IE remotely: