Java Upgrade Guide:
Migrating From the Microsoft VM
for Java to the Sun JRE


Search Guide


This guide explains why and how to upgrade applets from the Microsoft Virtual Machine (VM) for Java to the Sun JRE. In 98% of cases, applets run unchanged under the Sun JRE. For the remaining 2%, this document points to migration tips. The results of upgrading should be richly rewarding, as the Microsoft VM is based upon version 1.1, an early, 1997 version of Java technology. The latest, standards-compliant version from Sun Microsystems is 1.4.2. Released in 2003, it includes many enhancements over the early version.

Why Upgrade?

The Microsoft VM, based upon Java 1.1 technology that is over five years old, is clearly outmoded. On the other hand Sun Microsystem's VM, which is part of Sun's 1.4.2 Java Runtime Environment (JRE), is thoroughly standards compliant and up to date. That makes one good reason for upgrading Java applets and applications to run on the Sun JRE. But there are other compelling reasons: millions of copies of the Sun JRE have already been downloaded and deployed, and millions of new computers will soon be shipping with the Sun JRE. The time is ripe for upgrading.

Another reason to upgrade is that after September, 2004, Microsoft will no longer support or provide a Java implementation with any of its products. Microsoft has already discontinued shipping Java technology in its Internet Explorer web browser with the latest versions of its operating systems. This has two important implications:

Note that while Microsoft makes a case for migrating Java applets and applications to J# or C#, neither of these solutions offers cross-platform capability. J# and C# run only on the Microsoft Windows platform.

How to Upgrade

Here are the steps for upgrading to the Sun JRE:

  1. Install the Sun JRE if it is not already installed.
  2. Check that your browser uses the Sun JRE and not the old Microsoft VM.
  3. Test your applet with the Sun JRE to determine if the applet runs correctly. If the applet doesn't run correctly, find the problem in the list of Potential Upgrade Issues. Click on any issue to see an article that discusses the synopsis, symptom, cause, resolution, and related information, for that issue.

Although most applets run correctly in the Sun JRE, testing is always a good idea. If you should detect an issue, the solution is at hand. Once you have upgraded your applets, they will be able to run on a robust, secure, cross-platform, standards-compliant version of the Java platform.

Once you have confirmed that your applet works properly with the Sun JRE, you may want to consider the best way of deploying the Sun JRE for users. See Internet/Intranet Deployment of the Sun JRE.

Installing the Sun JRE

If you don't already have the Sun JRE installed on your test computer, click below to get it.

Checking the VM/JRE

Before you test your applet, you need to make sure that your browser is running the Sun JRE.

To do so, first open the Windows Control Panel (Start > Settings > Control Panel), then double-click the coffee-cup icon labeled Java Plug-in to launch the Java Plug-in Control Panel. When it appears, select the Browser tab. It looks like this:

Make sure that the check box for the browser you are using is checked.

Next, verify that your browser is running the Sun JRE. If it is, when you run the applet you should:

Java Icon in System Tray:

Java Logo in Gray Box:

Note: If you have Show Java Console selected in the Java Plug-in Control Panel (Basic tab), then the Java Console displays and shows a Java version number, as shown in the next section. The version number indicates which Sun JRE is being used by your browser.

Testing Your Applet

Test your applet by running it. If you have a set of standard tests for it, run it through those tests.

If there is a compatibility issue, you will see details about it in the Java Console. The Java Console looks like this:

For details about the Java Console, see http://java.sun.com/j2se/1.4.2/docs/technotes/guides/plugin/developer_guide/console.html

Potential Upgrade Issues

Here are some potential issues, listed by symptoms, that you might encounter:

If you run into an issue not covered in the preceeding list, please see the Java Upgrade Forum:

http://forum.java.sun.com/forum.jsp?forum=481