How to get it work with Google App Engine ?

38 views
Skip to first unread message

Prempena

unread,
Feb 19, 2011, 6:13:18 AM2/19/11
to gwtai
Hi,

When writing code to implement applet I’m getting the following error
in Eclipse : javax.swing.JApplet is not supported by Google App
Engine's Java runtime environment. How can I solve this ?

Thanks

Drossen Koren

unread,
Dec 2, 2013, 4:50:49 PM12/2/13
to gw...@googlegroups.com
The interface to your Applet has to inherit from com.google.gwt.gwtai.applet.client.Applet not javax.swing.JApplet or java.awt.Applet. This interface represents a handle to your Applet that can be used to call methods from GWT, it should not contain any Swing code.

The Applet implementation implements the above mentioned interface and contains the actual logic. Make sure that you place the Applet class in a separate package; otherwise the GWT compiler will try to translate it to JavaScipt.  This is most likely what causes your errors, but I am not sure because there is not much information provided your post.

If your applet's interface does extend the com.google.gwt.gwtai.applet.client.Applet interface, then you probably have your applet's implementation classes included in the classes directory in your WAR file.  Make sure you are excluding them when generating the WAR file.  The applet's implementation classes should only be in the applet's JAR file.  Since I have never used Google App Engine, I do not know if this will work.

Thank you,

Drossen
Reply all
Reply to author
Forward
0 new messages