Skip to content Skip to sidebar Skip to footer

Gwt-exporter. Working Example

I have a Java lib and I need to convert it to JS. I found the solution GWT to create utility javascript library to use gwt-exporter. I never used GWT before. I tried GWT-exporter.

Solution 1:

https://code.google.com/p/gwt-exporter/wiki/GettingStarted is poor. To compile JS I added gwt-maven-plugin.

Also I created .gwt.xml file with description of my module.

Following dependency is mandatory

<dependency><groupId>com.google.gwt</groupId><artifactId>gwt-user</artifactId><scope>provided</scope></dependency>

Solution 2:

Apart from adding gwt-exporter to your class-path, did you update your module file (application_name.gwt.xml) inheriting the gwt-exporter dependency?.

If so, in this file you should have an entry-point tag pointing to the class to run when the app starts. Open that java file and add the exportAll call.

Finally visit all the classes/methods you want to make available in javascript and annotate them appropriately like in the getting started page is indicated

Post a Comment for "Gwt-exporter. Working Example"