站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Java 2 SDK v1.4.2, Java 2 SDK 英文文档

Using the Conventional Applet Tag - Java 2 SDK v1.4.2, Java 2 SDK 英文文档


Using the Conventional APPLET Tag


This section includes the following topics:

Support for the APPLET Tag

JavaTM Plug-in now supports the HTML APPLET tag for launching applets. Users may configure their browsers so that Sun's JRE is the default runtime environment for handling APPLET tags.

Notes

  1. Even though Java Plug-in now supports the APPLET tag, it does not support applets that make use of proprietary technologies. Examples of such technologies are:
    • CAB files
    • Authenticode signing
    • Java Moniker
  2. With the conventional applet format, use of an attribute named object with a PARAM element will cause an exception with the Sun VM: 'Either "code" or "object" should be specified, but not both.'. With the Microsoft VM, no exception will be thrown. This is a compatibility issue. To avoid the exception with the Sun VM, do not use an attribute named object with a PARAM element in an applet.

Compatibility with the OBJECT Tag (Internet Explorer on Windows Platform)

This release of Java Plug-in supports the use of APPLET tags for launching applets. However, it is also fully backward compatible with previous Java Plug-in releases in its support of the OBJECT tag for launching applets in Internet Explorer running on the Windows platform. As before, developers have the option of using the HTML Converter to set up their applet web pages to use the OBJECT tag.

For more information about using OBJECT tags to launch applets on Java Plug-in, see Using OBJECT, EMBED and APPLET Tags in Java Plug-in and Using the HTML Converter to Convert Applet Tags for Java Plug-in.

Supported Platforms and Browsers

The support for the APPLET tag in Java Plug-in is intended for use on the following operating systems:

Java Plug-in provides support for the APPLET tag on the following web browsers:

Note

Applet tag support currently does not work on Netscape 4.

Updating Old Class Files

In some cases, the new Java Runtime Environment associated with this Java Plug-in release will not run class files that were generated with old compilers. The usual symptom is a java.lang.ClassFormatError that the virtual machine throws when it attempts to load such a class file. This failure has nothing specifically to do with the changes in this release. Rather, old bytecode compilers did not strictly adhere to proper class-file format in all situations when generating class files. Recent virtual machines are implemented to be strict in enforcing proper class file format, and this can lead to errors when they attempt to load old, improperly formatted class files. Some typical problems in some older class files are (this list is not exhaustive):

You can avoid this type of problem by recompiling your classes with the Javac bytecode compiler from the current Java 2 SDK. If you choose to use a third-party obfuscator, be sure to use one that produces class files that respect proper class-file format.

Other Enhancements

In addition to the support for the APPLET tag described above, the Java Plug-in has many performance and architecture enhancements that will make it more suitable for widespread use on consumer client machines that typically are not as powerful as client platforms in an enterprise environment. Some of these enhancements are summarized below.

Memory management

Performance

Design

JDK 1.1 compatibility

See also Updating Old Class Files above.