站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Java Tutorial 5.0 英文版

Using the embed Tag - Java Tutorial 5.0 英文版

The JavaTM Tutorial
Previous Page Lesson Contents Next Page Start of Tutorial > Start of Trail > Start of Lesson Search
Feedback Form

Trail: Deployment
Lesson: Applets

Using the embed Tag

You use the embed tag to deploy applets that are to be used only with the Mozilla family of browsers.

Following is an example of the embed tag:

<embed code="Applet1.class"
  width="200" height="200"
  type="application/x-java-applet;version=1.5.0"
  pluginspage="http://java.sun.com/j2se/1.5.0/download.html"/>

The type attribute can have one of two forms:

  • type="application/x-java-applet;version=1.5.0"

    With this form, the highest installed JRE that supports the MIME type

    application/x-java-applet;version=1.5.0 is invoked to run the applet. If a JRE with a version number equal to or greater than the version number specified is installed locally, then that JRE is invoked. Otherwise the user is directed to the URL specified as the value of the pluginspage attribute and prompted to download and install the required JRE.

  • type="application/x-java-applet;jpi-version=1.5.0_01

    With this form, a JRE with the exact version given by the the value of jpi-version (in this example, 1.5.0_01) is invoked to run the applet. Otherwise the user is directed to the URL specified as the value of the pluginspage attribute and prompted to download and install the required JRE.


Previous Page Lesson Contents Next Page Start of Tutorial > Start of Trail > Start of Lesson Search
Feedback Form

Copyright 1995-2005 Sun Microsystems, Inc. All rights reserved.