Java plug-in (Java virtual machine) and web browser.


At the moment of creating Java applet for the HelloDevice, you can choose a Java virtual machine for your applet. The only difference of files to be deployed from "Create applet" menu is in the script of "index.html". By changing the script of this file, the applet can change the Java virtual machine on which it will run.

Microsoft Internet Explorer and Netscape Navigator have their own virtual machine so that they can recognize <applet> tag in an HTML file and run the applet contained in the page using their own virtual machine. Instead of using <applet> tag, you can use <object> (for IE, or <embed> for Netscape) tag so that the browser does not use its own Java virtual machine and attempts to load special plug-in to run the applet. This special plug-in is Sun's Java plug-in. Sun's Java plug-in is a set of Java virtual machine and core Java class libraries. The plug-in is usually bundled with JRE (Java runtime environment). With Sun's OJI (Open JVM interface) technology, Java plug-in replaces default Java virtual machine of the browser.

Find yourself the difference of HTML scripting.

"index.html" scripting (using browser's default Java virtual machine)
<html>
<head>
<title>MyApplet-HelloDeviceIDE</Title>
</head>
<body>
<applet archive="./audio.jar,./image.jar,./myapplet.jar,./support.jar" code="MyApplet.class" width="500" height="400">
<param name=useplugin value="no">
</applet>
</body>
</html>
"index.html" scripting (using Sun's Java plug-in)
<html>
<head>
<title>HelloDevice Applet page MyApplet</Title>
</head>
<body>
<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" width="500" height="400" codebase="http://java.sun.com/products/plugin/1.3/jinstall-13-win32.cab#Version=1,3,1,0">
<param name=java_code value="MyApplet.class">
<param name=java_codebase value=".">
<param name=java_archive value="audio.jar,image.jar,myapplet.jar,support.jar">
<param name=java_type value="application/x-java-applet;version=1.3">
<param name=scriptable value="false">
<param name=useplugin value="yes">
<COMMENT>
<EMBED type="application/x-java-applet;version=1.3" java_code="MyApplet.class" java_codebase="." java_archive="audio.jar,image.jar,myapplet.jar,support.jar" width="500" height="400" scriptable="false"" useplugin="yes" pluginspage="http://java.sun.com/products/plugin/1.3/plugin-install.html">
<NOEMBED>
</COMMENT>
No Java 2 SDK, Standard Edition v 1.3 support for applet!
Please install Java plug-in so that this applet work correctly.
If you are not prompted to download Java plug-in,
download it manually from <a href="http://java.sun.com/j2se/1.3/jre/download-windows.html">here</a>
</NOEMBED>
</EMBED>
</OBJECT>
</body>
</html>

Using Browser's default Java virtual machine
When you are trying to browse an IDE applet with the default Java virtual machine of the browser, you may feel somewhat dull with the job because browser's JVM is not kind enough to tell users the current status of executing. and the speed is slow.
If you are using Microsoft Internet Explorer, check the version of the Java virtual machine of your browser by opening Java console. It is better to keep your Java virtual machine updated. Microsoft's the latest build of Java virtual machine is build 3802 as of July 2001. You can get it at http://www.microsoft.com/java/vm/dl_vm40.htm.
If you are a Netscape 4.x user, an IDE applet will not work correctly with your browser. In this case you have to use Sun's Java plug-in. Netscape 6 uses Sun's Java plug-in as its default Java virtual machine.
If you are experiencing any troubles with the default Java virtual machine of your browser, check out FAQ's page.

* It is always a good idea to use Sun's Java plug-in instead of the default Java virtual machine of the browser and is strongly recommended. By using Sun's Java plug-in, the size of file 'support.jar' which is created along with other applet files can be down sized by 25 kilobytes more or less.

Using Sun's Java plug-in
To run the applet on Sun's Java plug-in, the Java plug-in must be installed in the system before browsing the html page. If Sun's java plug-in is not already installed in the system, you will be prompted to download and install Java plug-in at the beginning of browsing the applet.
Internet Explorer and Netscape both work well with this Java plug-in.
Download the latest version of Java plug-in at http://java.sun.com/j2se/1.3/jre/download-windows.html. Don't forget to download an international version if your operating system's language is not English.
The latest version of Sun's java plug-in is version 1.3.1 as of July 2001. Note that the plug-in version 1.3.0.0 will work but it will work very slowly. To experience the best execution of IDE applet, use the latest version.

Note : Be sure to use Java plug-in version 1.3.0_02 or higher (1.3.1) not 1.3.0

Note : If you are using Netscape 6 and you have deployed applet files with the default Java virtual machine of the browser, the audio alarm will not play. To enable this, change the value of "useplugin" parameter in 'index.html' to "yes". 
    ex) <param name=useplugin value="yes">
Because Netscape 6 uses Sun's Java plug-in as its default Java virtual machine, you need to change this parameter manually.

กก

Java virtual machine, you need to change this parameter manually.

กก