Sun Java Solaris Communities My SDN Account Join SDN
 
FAQ

Java Plug-in Software 1.3 FAQ

 
 
TM PLUG-IN 1.3 DEVELOPER
INFORMATION FAQ

Java Plug-in Software Home Page
Documentation

     Information for Web Page Authors
     Information for Applet Developers
     Information for System Administrators
 
 

Information for Web Page Authors  back to top 

Q: As a web page author, how do I use Java Plug-in Software?

A: To utilize all of the features and capabilities of Java 2 SDK, Standard Edition v 1.3 in IE or Navigator, web page authors must modify the page's HTML to specify the use of Sun's JRE via Java Plug-in Software. Sun is providing a written specification, to guide web page authors how to make these changes. In addition, Sun provides the Java Plug-in Software HTML Converter, free of charge, that will automatically make the changes to the HTML of a selected web page (or set of web pages).

Q: How can I get the the Java Plug-in Software HTML Converter?

A: Sun is distributing the Java Plug-in Software HTML Converter royalty-free through the Java Plug-in Software HTML Converter download page.

Q: How do I install and run the HTML Converter 1.3?

A: In this release of the HTML Converter, there is only one ZIP file for downloading for all platforms (Win32, Mac, UNIX, Java). See Using the HTML Converter for installation instructions.

Notice that the HTML Converter 1.3 requires that JRE 1.3 be installed.

Q: How can I run the Java (.zip) version of the Java Plug-in Software HTML Converter after the installation?

A: The instructions are provided in Using the HTML Converter.

Q: What capabilities do the supplementary templates provided with the Java Plug-in Software HTML Converter provide? 

A: The Java Plug-in Software HTML Converter provides both a default template (default.tpl), and three supplementary templates. These supplementary templates allow web page authors to more explicitly target the browsers and platforms used in their environment when modifying their pages using the Java Plug-in Software HTML Converter:

  1. default.tpl:  The default template used by the Java Plug-in Software HTML Converter. The converted page can be used in Internet Explorer and Navigator to invoke the Java Plug-in Software on the supported platforms.
  2. extend.tpl:  The converted page can be used in any browser on any platform. If the browser is Internet Explorer or Navigator on Windows 95, Windows NT, or Solaris, Java Plug-in Software will be invoked. Otherwise, the browser's default Java runtime is used.
  3. ieonly.tpl:  The converted page can be used to invoke Java Plug-in Software in Internet Explorer on the supported platforms.
  4. nsonly.tpl:  The converted page can be used to invoke Java Plug-in Software in Navigator on the supported platforms. 

Q: How do I specify a JAR file as part of an OBJECT or EMBED tag? 

A: You can specify one or more JAR files by defining an ARCHIVE parameter to the OBJECT or EMBED tag.

With the OBJECT tag this looks like:

    <PARAM NAME=archive VALUE=demo.jar,fred.jar> With the EMBED tag this looks like:     archive=demo.jar,fred.jar

Q: Does Java Plug-in Software support multiple JAR files in the ARCHIVE attribute in the APPLET tag? If so, why can't I get this to work?

A: Java Plug-in Software supports the ARCHIVE attribute in both the EMBED and OBJECT tags. The most common mistake is to put the JAR files in the wrong order. For example, if you use the Swing set in Java Plug-in Software and specify ARCHIVE="Myjar.jar,swing.jar,..." Java Plug-in Software will fail to load the applet because by the time Myjar.jar is loaded and Java Plug-in Software tries to initialize the applet, swing.jar is not yet loaded. The JAR files in the ARCHIVE should be in the order of dependency. Since Myjar.jar depends on everything else, it should be put at the end of the list. The other common mistake is to put spaces or paths with the JAR file lists.

Information for Applet Developers  back to top 

Q: Do developers need to modify their applets in order to support Java Plug-in Software?

A: No. Any Java 2 SDK, Standard Edition v 1.3-based, 100% Pure Java applets should run unmodified using the Java Plug-in Software.

Q: What is the applet lifecycle in Java Plug-in Software? Is it different than in 1.2?

A: The applet lifecycle in Java Plug-in Software 1.3 is the same as it was in 1.2. When an applet is encountered on an HTML page, the applet will be initialized and started. When the HTML page is closed, or the back button is pushed, the applet with be stopped and destroyed immediately.

When the same HTML page is encountered again, the applet will be initialized and started again.

Q: Does Java Plug-in Software support Drag and Drop between applets and the native environment? If so, why can't I get it to work?

A: Yes, Java Plug-in Software does support Drag and Drop. You must make sure to grant the applet the correct socket permissions using policytool to use this feature. Please see the SocketPermission class documentation for more information.

Q: How can I speed up applet download time?

A: There are several ways:

  • JAR files - bundle your applets as JAR files
  • JAR indexing - optimize the class loading process. See the JAR File Specification for details.
  • Disk caching - cache class or JAR files in the browser's cache
  • Applet installation - cache your applets in a permanent cache

Q: How do I prevent the warning banner covering my GUI state? 

A: You should use the getInsets() method to find the size of your frame's decorative border. This includes the warning banner. For example, if you create a Frame with size 100x100, you might find it has insets [top=42,left=5,bottom=5,right=6] giving you a drawable area of 89x53. You need to position your work within the drawable area.

If you need to create a drawable area of a particular size, first create and show the Frame, then use getInsets to find the insets' sizes, then figure out the desired frame size by adding your desired size to the insets, then use frame.setSize() to set your frame to that size.

Q: Why does InetAddress.getLocalHost().getHostName() return "localhost"?

A: This is a deliberate security feature in the Java 2 platform. Untrusted applets will not be given the real host name.

Trusted applets (such as signed applets) will be given the real host name.

Q: Are the MIME types "application/x-java-vm/java-applet" and "application/x-java-vm/java-bean" still recognized by Java Plug-in Software? 

A: Yes. Java Plug-in Software 1.3 supports the following MIME types:

     "application/x-java-applet;version1.3"
     "application/x-java-bean;version=1.3"

For more information about these MIME types, please check the Java Plug-in Software HTML Specification.

Information for System Administrators  back to top 

Q: I would like to change the Java Plug-in setting in thousands of machines through system management tools. What should I do?

A: Java Plug-in stores user specific settings in the registry under HKEY_CURRENT_USER\Software\JavaSoft\Java Plug-in. Therefore, if administrators would like to change the Java Plug-in settting globally, they may use system managment tools to update the registy values under this keys in all machines, so Java Plug-in settings will be set globally. This is extremely useful if administators would like to change global setting such as "trustProxy".

Q: Does Java Plug-in Software replace Microsoft's or Netscape's Java runtime with Sun's JRE?

A: No. Java Plug-in Software does not replace the browser's underlying virtual machine. Rather, Java Plug-in Software simply enables web page authors to specify that Sun's JRE is used instead of the default Java runtime.

Q: What happens on browsers other than IE or Navigator, or on non-supported platforms?

A: The default conversion template provided with the Java Plug-in Software HTML Converter (used on the demonstration page), is designed such that the applet will not be rendered in browsers other than Internet Explorer and Netscape Navigator on platforms other than Windows 95, Windows 98, Windows NT 4.0, and Solaris 2.5 and 2.6. However the Java Plug-in Software HTML Converter provides additional templates allowing web page authors to specify that on non-supported platforms applets will be rendered using the original <APPLET> tag using the browser's default Java runtime. See this related question for more information.

Q: We are trying to deploy Java Plug-in Software within our intranet environment. The Java Plug-in Software HTML Specification and other online documents mention that we should set up a Netscape Plug-in Software installation page within our intranet for Netscape users to install Java Plug-in Software. What does this page do and how should we set it up?

A: The purpose of this installation page is to act as an entry point for Netscape users to install Java Plug-in Software. If users encounter an HTML page that requires Java Plug-in Software, the user will get redirected to this installation page according to the pluginspage attribute in the EMBED tag. At that point, the users should be able to download and install the correct version of Java Plug-in Software for their platform. Thus, the installation page should have link to download the Java Plug-in Software binary.

An simple example page would look like:

<HTML>
<HEAD>
<TITLE>Java Plug-in Software Download Page</TITLE>
</HEAD>
<BODY>
<P><A HREF="ftp://myhost.com/public/jre12-win32.exe">
    Java Plug-in Software 1.3 for Windows 95/98/NT</A>
</P>
<P><A HREF="ftp://myhost.com/public/plugin-12-solaris.bin">
	Java Plug-in Software 1.3 for Solaris</A>
</P>
</BODY>
</HTML>

Depending on how your webserver is configured, you may want to consider using CGI scripting instead of FTP for the download. Contact your webmaster for more information.

Q: Why is the download and installation experience different in Netscape Navigator than in Internet Explorer?

A: The releases of Netscape Navigator supported by Java Plug-in Software do not provide mechanisms that allow for the automatic download and installation of Java Plug-in Software, as in Internet Explorer. The first time Netscape Navigator comes across a web page that is enabled for Java Plug-in Software (the "activated page"), it redirects the user to another web page to download and install Java Plug-in Software on the user's system. The user must then return to the "activated page" to render the applet using Java Plug-in Software. From that point forward, the browser automatically invokes Java Plug-in Software each time it comes across web pages that supports the technology--completely transparent to the end user.

Oracle is reviewing the Sun product roadmap and will provide guidance to customers in accordance with Oracle's standard product communication policies. Any resulting features and timing of release of such features as determined by Oracle's review of roadmaps, are at the sole discretion of Oracle. All product roadmap information, whether communicated by Sun Microsystems or by Oracle, does not represent a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. It is intended for information purposes only, and may not be incorporated into any contract.