Solaris Java Plug-in User's Guide

Java Plug-in in Netscape Navigator on Microsoft Windows and Linux Platforms or SolarisTM operating environments

To use Java Plug-in in Netscape NavigatorTM 4 browsers on Microsoft Windows and Linux platforms or SolarisTM operating environments, use the EMBED tag. The following example maps an APPLET tag to a Java Plug-in EMBED tag:

Original APPLET tag:


<APPLET code="XYZApp.class" codebase="html/" align="baseline"
          width="200" height="200">
<PARAM NAME="model" VALUE="models/HyaluronicAcid.xyz">
          No Java 2 SDK, Standard Edition v 1.4 support for APPLET!!
</APPLET>

New EMBED tag:


<EMBED type="application/x-java-applet;jpi-version=1.4" width="200"
        height="200" align="baseline" code="XYZApp.class"
        codebase="html/" model="models/HyaluronicAcid.xyz"
        pluginspage="http://java.sun.com/jpi/plugin-install.html">
<NOEMBED>
No Java 2 SDK, Standard Edition v 1.4 support for APPLET!!
</NOEMBED>
</EMBED>

Note that the EMBED tag contains similar information to the APPLET tag, and it is sufficient to launch Java Plug-in in Netscape Navigator browsers. The attribute type in the EMBED tag is used for identifying the type of the Java programming language executable, such as an applet or a bean. When a Netscape Navigator browser renders this attribute in the EMBED tag, it will try to load Java Plug-in into the browser. By specifying the type attribute, Java Plug-in will know how to initialize the Java programming language executable.

In the above example, several attributes in the EMBED tag, such as width, height and align, map directly from the corresponding attributes in the APPLET tag. These contain formatting information that a Netscape Navigator browser uses to position Java Plug-in. Since this information is mapped directly without changes, the position and appearance of the applets using Java Plug-in should be the same as those applets using the APPLET tag.

Unlike the OBJECT tag, all information must be stored inside the <EMBED> tag instead of using PARAM. Therefore, all attributes and params in the APPLET tag must be mapped as attribute-value pairs inside the EMBED tag.

In the above example, the code and codebase attributes in the APPLET tag are mapped into the EMBED tag attributes. Attribute code identifies the applet. Its value should be the same as the code attribute in the APPLET tag. Attribute codebase identifies the codebase of the applet. Java Plug-in knows where to download the applet or JavaBeans component because it can read this information from the attributes. Also notice that the model attribute within the EMBED tag is mapped from the model param inside the APPLET tag.

Like the codebase attribute in the OBJECT tag, attribute pluginspage in the EMBED tag is used by Netscape Navigator browsers if Java Plug-in is not installed. It should always point to the Java Plug-in Download Page on the Java Software web site.

The text "No Java 2 SDK, Standard Edition v 1.4 support for APPLET!!" in the APPLET tag is mapped inside the <NOEMBED> and </NOEMBED> tags. Originally, this text is displayed only if the browser does not have Java technology support. By mapping it inside the NOEMBED tag, this text will be displayed if the browser does not support the EMBED tag or if the browser fails to start the Java Plug-in.

The APPLET-EMBED tag attributes mapping is as follows:

Attributes 

APPLET tag support 

EMBED tag support 

Attribute map in EMBED tag 

ALIGN 

Attribute ALIGN 

ALT 

Attribute ALT 

ARCHIVE 

 

Attribute archive 

CODE 

 

Attribute code 

CODEBASE 

 

Attribute codebase 

HEIGHT 

Attribute HEIGHT 

HSPACE 

Attribute HSPACE 

NAME 

Attribute NAME 

OBJECT 

 

Attribute object 

TITLE 

Attribute TITLE 

VSPACE 

Attribute VSPACE 

WIDTH 

Attribute WIDTH 

MAYSCRIPT 

Attribute MAYSCRIPT 

Some attributes are special to the EMBED tag. These attributes are:

Attribute 

Meaning in EMBED tag 

Attribute type 

If it is an applet, the value should be "application/x-java-applet;jpi-version=1.4" or "application/x-java-applet". If it is a bean, the value should be "application/x-java-bean;jpi-version=1.4" or "application/x-java-bean". 

Attribute codebase 

Specifies the base URL of the applet. This attribute is optional. 

Attribute code 

Specifies the name of the Java applet or JavaBeans component. It cannot be used with param object inside the same EMBED tag. 

Attribute object 

Specifies the name of the serialized Java applet or JavaBeans component. It cannot be used with param code inside the same EMBED tag. This attribute is optional. 

Attribute archive 

Specifies the name of the Java archive. This attribute is optional. 

Attribute pluginspage 

It should be a full URL pointing to an HTML page somewhere on the network. 

Attribute mayscript 

Specifies whether the applet is allowed to access netscape.javascript.JSObject. The value can be either "true" or "false". This attribute is optional. 

Similar to the OBJECT tag case, if the original APPLET tag has PARAM type, codebase, code, object, or archive, mapping it to the EMBED tag attribute will cause a problem. To avoid this, Java Plug-in also supports the same new set of attribute names, as follows:

Original Attribute Names 

New Attribute Names 

code 

java_code 

codebase 

java_codebase 

archive 

java_archive 

object 

java_object 

type 

java_type 

You should use these new attribute names only necessary. If both new and original attribute names exist in the same EMBED tag, the value associated with the new attribute name is always used by Java Plug-in to load the applet or bean.