Applets Section Index | Page 3
How do I change the default Locale for an applet?
This is no different than for an application or servlet. Just call the setDefault() method of Locale.
How does installing an applet locally affect the applet security model?
If you have a user copy the class files for an applet to be loaded locally (via a file: URL instead of an http: URL), the applet security model is essentially thrown out and the applet can do anyt...more
I tried to load an applet that didn't subclass java.applet.Applet and Internet Explorer didn't complain. What's up?
This is an interesting feature of Internet Explorer's non-standard VM. If the class doesn't subclass Applet, it will still load. The "magic" methods of applets won't be called though [init(), star...more
Is it possible to use the addShutdownHook or runFinalizersOnExit (Class Runtime) to trigger the shutdown of IE or the plugin.
Is it possible to use the addShutdownHook or runFinalizersOnExit (Class Runtime) to trigger the shutdown of IE or the plugin. I registered a simple thread (prints out a message to the console, plug...more
Is the destroy() method of an applet guaranteed to run?
Nope. The browser may crash or just shutdown before it finishes running the method for all loaded applets.
Is the getApplet() method case sensitive?
The expected behavior is case insensitive. However, implementations may vary. The javadoc for the method does not specify.
My applet works fine locally, but after transfering it to my web server, it doesn't work any more. What could the problem be?
If you used FTP to transfer the files, make sure they were transfered in binary mode. If the web server is a Unix-based system, make sure the owner of the web server process has at least read-acce...more
Other langauges can be compiled to Java byte codes. Can I use them to create applets, or does the security model prevent this?
The browser's runtime engine doesn't care what language or compiler was used to generate the byte codes. As long as the byte codes are valid, the class verifier will let them be loaded. The securi...more
Where should I copy the class file of applet in Tomcat? Where should I copy respective HTML file?
HTML (and .JSP) files are placed under the webapps/ROOT directory under the installation directory (or other than ROOT if you've defined a different context). Applet .class files would then be pla...more
How can I define two or more directories for the codebase parameter?
You cannot define two or more directories in the codebase paramter.
How do I pass parameters to an applet from a URL?
How do I pass parameters to an applet from a URL?
I'm trying to create a simple applet that reads paramters passed to it in a url.
What does the applet need to do to get these values? My url is:
h...more
How to get notification of browser/plugin shutdown in a applet?
You do not get notification of this event within an applet.
Do you know what are the Java packages shipped in MS IE? Where can I find the documentation of those packages?
I can't seem to find any online versions of the documentation any more, but you can download the final documentation set from Microsoft at http://download.microsoft.com/download/javasdk/install/4....more
How can I disable caching with the Java Plug-in?
The 1.4 version of the Plug-in supporting disabling. Bring up the control panel for the Plug-in and select the Cache tab. From there, you can uncheck the "Enable Caching" option.
Where can I find out what JAR files are currently cached by the Java Plug-in?
The control panel for the 1.4 version of the Java Plug-in has a View JARs in Cache option. From there, you can delete individual JAR files, look for updates of individual JAR files and limit the s...more