Why am I getting a NullPointerException when running HTML Playn samples?

I am trying to run Playn html web application samples in Eclipse. I have completed the following steps:

http://code.google.com/p/playn/wiki/GettingStarted#Running_via_Eclipse

I am running Eclipse 3.7 on Ubuntu 11.10. I installed the plugins and I was able to successfully run the Java version.

However, when I start GWT Compile by right-clicking on the html list in Package Explorer, I get the following error:

An internal error occurred during: "playn-showcase-html - compiling GWT". java.lang.NullPointerException

This also happens with other samples. When I get to the GWT Compile dialog box, the top message says: "The project has errors."

When I start Eclipse, I get the following message in the console:

GWT SDK is not installed.

However, the SDK is installed. I double checked by following these steps:

http://code.google.com/intl/da-DK/eclipse/docs/install-eclipse-3.7.html

And I get the following message:

The "Google Web Toolkit SDK 2.4.0" will be ignored because it is already installed.

+4
source share
1 answer

By reinstalling the GWT plugin and then editing the configuration settings in Eclipse, I was able to solve this problem. A common problem seems to be wiring the correct paths. I'm not sure what exactly this allowed, since I played a little, but here is how I think I did it:

  • Click Settings> Google> Web Toolkit.
  • Added path: .. com.google.gwt.eclipse.sdkbundle_2.4.0.v201201120043-rel-r37 / gwt-2.4.0 / and click OK
  • Right-click playn-showcase-html in package explorer
  • Selected Build Path> Configure Build Path ...
  • Google Selected> Web Toolbox from the list in the left pane
  • In the GWT SDK field, click "Use a specific SDK", select only one option and click "OK"

I was able to compile and create a link to a web server.

Then I uploaded the link in Chrome. If you get a message about the need to recompile the module, go back to Eclipse and recompile the HTML directory (right-click on the HTML directory> Google> GWT compilation.) Then reload the page (F5) in Chrome.

+5
source

Source: https://habr.com/ru/post/1398177/


All Articles