Java applets in Web pages

Page Designer supports both traditional, AWT-based applets and Swing-based, JApplet classes by using the

Insert | Others | Java Applet menu option, or by dragging and dropping the applet from the Enterprise Explorer view.

Depending on the client browser type and version, and the corresponding Java™ Plug-in version, <OBJECT>, <EMBED>, or <APPLET> tag syntax might be required to run the applet properly. See the Encountering OBJECT, EMBED, and APPLET Tags With Different Plug-in Versions and Browsers document for details about the tagging variations required to run Swing applets on various browsers.

To resolve this problem, Sun provides the Java Plug-in HTML Converter, which converts files that contain applets to a form that uses the Java Plug-in. The converters are part of the Java Development Kit (JDK), Version 1.3 and above. For more information, see Java Plug-in 1.3 HTML Converter .

Note: Your browser must have the Java Plug-in installed to take advantage of the Sun Java 2 Runtime Environment, Standard Edition (JRE)'s ability to run applets predictably across browser types.

Because the HTML Converter is a Java application, have a copy of the JDK available to your machine. You must also make sure that your CLASSPATH and PATH variables are set correctly, as explained in the

README.txt file that comes with Swing. See the HTML Converter user documentation for more information about installing, starting, and using the converter.

The converter provides a command line interface and a GUI. When you have started the HTML Converter, the easiest way to convert files is to perform your conversions one file at a time, although the default is to convert all files in a folder. After you have finished converting the files that contain Japplet classes, the converter adds the appropriate tagging to optimize the way your applets run in various browsers.

Once you have inserted JApplets in your Web pages, you should run the pages through the HTML Converter. The converter will then automatically convert the <APPLET> tags in your Web pages to tags that the Java Plug-in recognizes.

 

Related tasks

Adding scripts, controls, and effects to Web pages

Inserting applets

Adding server-side includes to Web pages