Java

AppletViewer Tags

Documentation Contents
The applet viewer makes it possible to run a Java applet without using a browser. AppletViewer ignores any HTML that is not immediately relevant to launching an applet. However, it recognizes a wide variety of applet- launching syntax. The HTML code that AppletViewer recognizes is shown below. All other HTML code is ignored.

object

The object tag is the HTML 4.0 tag for embedding applets and mult-media objects into an HTML page. It is also an Internet Explorer 4.x extension to HTML 3.2 which allows IE to run a Java applet using the latest Java plugin from Sun.
<object
  width="pixelWidth"
  height="pixelHeight"
>
  <param name="code" value="yourClass.class">
  <param name="object" value="serializedObjectOrJavaBean">
  <param name="codebase" value="classFileDirectory">
   ...
  alternate-text
</object>
Notes:

embed

The embed tag is the Netscape extension to HTML 3.2 that allows embedding an applet or a multimedia object in an HTML page. It allows a Netscape 4.x browser (which supports HTML 3.2) to run a Java applet using the latest Java plugin from Sun.
<embed
  code="yourClass.class"
  object="serializedObjectOrJavaBean"
  codebase="classFileDirectory"
  width="pixelWidth"
  height="pixelHeight"
>
   ...
</embed>
Notes:

applet

The applet tag is the original HTML 3.2 tag for embedding an applet in an HTML page. Applets loaded using the applet tag are run by the browser, which may not be using the latest version of the Java platform. To ensure that the applet runs with the latest version, use the object tag to load the Java plugin into the browser. The plugin will then run the applet.
<applet
  code="yourClass.class"
  object="serializedObjectOrJavaBean"
  codebase="classFileDirectory"
  width="pixelWidth"
  height="pixelHeight"
>
  <param name="..." value="...">
   ...
  alternate-text
</applet>
Notes:

app

The app tag was a short-lived abbreviation for applet that is no longer supported. AppletViewer translates the tag and prints out an equivalent tag that is supported.
<app
  class="classFileName" (without a .class suffix)
  src="classFileDirectory"
  width="pixelWidth"
  height="pixelHeight"
>
<param name="..." value="...">
 ...
</app>
For more information on the tags that AppletViewer supports and
how to combine them, see the Java PlugIn HTML Specification.


Copyright © 2001 Sun Microsystems, Inc. All Rights Reserved.

Sun
Java Software