|
FAQ
Frequently Asked Questions
I run the GWT Shell and get a dialog that says Java(TM) Plug-in Fatal Error.Alas the GWT Shell can not handle embedded things like Flash or Applets. There is some restriction in the SWT component used to run a browser inside of the Shell application. To test your application you have to compile the code and run it in a browser. For more information see the GWT issue 283. The GWT Java2JavaScript compiler says No source code is available for type javax.swing.JApplet.You have your applet implementation class within you client package, that does not work. You have to put the applet class into the server package, or in a package of its own. I don't want my GWT application to include the Applet source code.During compilation the GWT Java2JavaScript compiler needs to see the actual Applet implementation. But the respective annotation is compile time only. The GWT compiler only translates the files in the client package. So decoupling works by placing the classes into different packages. Once you compiled your project the GWT compiler output won't contain any Applet classes. I have problems compiling, the GWT compiler throws a StackOverflowError.On Linux please make sure you use a 32bit JDK, even on a 64bit platform you have to fall back on a 32bit JDK. This is not a GwtAI but a GWT problem. See the GWT Google Groups for more information on that one. The java.lang.StackOverflowError seems to occure only on a 1.6 JDK version. The easiest workaround the java.lang.StackOverflowError is to use a JDK 1.5 compiler, instead of JDK 1.6. So try using a 1.5 JDK to compile your code. With JDK 1.6 you can try to increase the heap size with some JVM arguments (e.g. -XX:PermSize=64M and -XX:MaxPermSize=256M). Although the heap size increase is not guaranteed to work. This is related to GWT issue 3510. Hint: If you rely on some JDK 1.6 libraries, you can still use JDK 1.5 to compile. Just run javac with the JDK 1.6 rt.jar in the classpath. The source tree includes JDIC, why is that required?The TrayIconApplet example class uses the JDesktop Integration Components (JDIC) project to hook into the desktop tray. GwtAI itself does not depend on JDIC. I get a ClassNotFoundException when I try to run the AppletThis is because the browser can not find the classes and resources needed to start the Applet. Since Java Applets are executed in a sandbox the whole code and resource loading works a bit different. To learn more about Applets and the Applet runtime (browser plugin) see the Applets section in the The Java Tutorials. In order to make the Applet loading work in the browser, you have to make sure that all resources are in the right place. Take the following steps: 1. Build one or multiple JAR files containing all classes and resources needed by your applet. 2. Use the GwtAI @Archive annotation to tell GwtAI how these JAR files are named. 3. Place the JAR files such that the browser can see them. E.g. in the GWT output directory or inside the WAR file you want to deploy. 4. Use the GwtAI @Codebase annotation to tell GwtAI where the JAR files can be found. Where can I get help?Please post questions and feedback to the GwtAI Google Group. |
Hello. How can I pass a java object to a applet function as parameter?
Hi,
Could you please explain more precisely your last point "I get a ClassNotFoundException? when I try to run the Applet" ?
The conciseness of your 4 steps let me confused... The way I understand it might result in obvious code redundancy and cyclic references.
Thanks in advance.
Hello, I agree with Makaveli, I have the same problem with "I get a ClassNotFoundException? when I try to run the Applet" issue. Please detail more here or in the getting start page, because a lot of people is asking about that in the web without answer! Thank you