2
virtual machine for running applets was designed by
Sun Microsystems in the form of a Netscape Plugin and
MS ActiveX which is actually a Java Bean to ActiveX bridge.
The browser first loads and starts the VM, which in
turn loads the applet and runs it. To be able to load
and start the VM your browser must recognize either
now standard tag <OBJECT> or older Netscape tag
<EMBED>. Former tag should be recognized by
MSIE v3 or better. The latter should be recognized
by Netscape Navigator v3 or better. Browsers that recognize
the tag <OBJECT>and can interpret it should
skip all elements between the <OBJECT> and
the corresponding closing tag </OBJECT> except
<PARAM> elements. There is also a recomendation
that browsers interpret all contents of elements that
they not recognize but it is not a 'law'.
In contradiction to
W3C
requirements it seems that some of Microsoft browsers
recognize both OBJECT and EMBED tags and interpret
content of OBJECT element. There is also
a nonstandard element COMMENT whose content is not
interpreted by Microsoft browsers but is interpreted by
Netscape Navigator. In aggreement with recomendations of
Sun Microsystem
I am using EMBED tags nested between COMMENT tags nested
between OBJECT tags on my pages. It works OK with fourth to sixth
generation browsers but am not sure if it works with older
browsers because I do not have them.
To run Java 2 applets is also necessary to download the dynamic link library with the Java 2 VM and runtime environment(JRE 1.2 or better) from Sun Microsystems and install it on your hard disk. The Java 2 VM or does not interfere in any way with older Java VM that may be part of your browser and applets can be run by both machines, depending on HTML tags. The downloaded software is in the form of selfextracting executable that you must run to accomplish the installation. Steps required to activate the plugin in Netscape browser are described below.
If you don't have JRE1.2 or better on your system, and you try to run Java 2 applet, your are given the opportunity to download and install a Java 2 VM and the Java 2 runtime environment. If you are using Netscape browser you will be led to the download page referred to above by clicking the green cockroach displayed instead of the applet and you can then download JRE for Java 2 in the form of selfextracting executable. After installation you activate the plugin by copying dlls whose names start width npjava from bin subdirectory of JRE install directory to Plugins subdirectory of Netscape install directory. If you are using Internet Explorer v4 you will be shown Sun's certificate and if you aggree with dowloading it will be carried out and immediately followed by installation. Activation of the activeX is also automatic and is accomplished by inserting its clsid into Windows registry. But to be sure you have the latest version it is better to access the download page from the above link and install the JRE from there. If you install JRE v1.31 you may choose to run Java 2 as a default VM for the APPLET tag. Then any applet no matter which tag are used will run with this VM and JRE. This functions for Microsoft Internet Explorers and Netscape v. 6.x.
You can test the ability of your system to run Java 2 applets by accessing this page. An applet using Java 2 VM will be displayed together with information about the version of your browser and operating system. Applet should say "Hello,you are using succesfully Java 2 VM." Java 2 console that is different from the console of your build in VM appears also when you run first Java 2 applet after booting your computer. You can just minimize it.
When loading pages containing applets intended to run with Java 2 the browsers show that the loading is finished after all applets on the page are loaded and initialized. An applet is initialized only, when its spot on the page becomes visible for the first time. To finish the loading scroll the pages with applets to the bottom. If you leave a page with an uninitialized applet, the console may contain error message (null pointer exception) as VM is trying to destroy the uninitialized applet. This error does not cause any further harm.
Most applets on this site can run either as Java 2 applets or using Java 1.1 VM. This type of VM is build in in MSIE4 and Netscape 4.5 and better browsers. Where the running the applet with Java 2 VM is of some interest, you will find in in the index two links, one to the page invoking Java 2 VM and one to the page invoking the VM build in the browser (when the option to run all aplet with Java2 was not chosen).