running html version of playn


I have playn installed on eclipse (, i loaded the sample programs and they load file, the java one runs fine. But for html I right click the showcase-html > google > compile I don't get any errors:

Compiling module playn.showcase.Showcase
   Compiling 1 permutation
      Compiling permutation 0...
   Compile of permutations succeeded
Linking into C:\Users\(my path)\playn-samples\showcase\html\target\playn-showcase-html-1.0-SNAPSHOT\showcase
   Link succeeded
   Compilation succeeded -- 12.208s

then run as > web application

I get a url in the development tab:

when I run this it hangs my browser

when I run this:

it says "GWT MODULE MAY NEED TO BE (RECOMPILED)" on a popup and loads nothing.

Any idea what might be wrong?


I don't recommend using Eclipse to compile and test the HTML5 backend of a PlayN game. Develop and test using the Java backend, and when the time comes to build the HTML5 version, use the Maven command line to build and test it. It is far more reliable.

However, if you insist on testing the HTML5 backend in Eclipse, you have to be careful. What you've done above is to first compile the Java code to JavaScript (by using Google -> Compile) and then overwritten the compiled JavaScript with GWT devmode stubs (when you used Run as -> Web application).

Instead, you should use Google -> Compile, and then expand playn-showcase-html -> target -> playn-showcase-html-1.0-SNAPSHOT and right click on Showcase.html and select Open With -> Web Browser. EDIT: You'll need to run the generated code in a webserver to avoid crosssite scripting issues.

You never want to use GWT devmode (Run as -> Web application) to test the HTML5 backend of your game, because GWT devmode is pathologically slow for running high-performance code like an HTML5 game.