|
Website by Michael Horowitz
|
|
|
Multiple copies of Java can be installed on a single computer, and, if you have more than one
web browser, each one can use a different version of Java, or none at all, so be sure to test
them all. Below are nine ways to determine the version of Java a web browser is using.
Note: The portion of Java that runs programs is referred to as the Java
Virtual Machine (JVM) or Java Run-time Environment (JRE).
This is my favorite - straight from the horse's mouth (so to speak). The Java Run-time Environment is aware of its version and the company that authored it. So I wrote a very simple applet (the source code is on the About page) that gets this information from the JRE and displays it in a pink rectangle.
| The version and vendor from the JRE |
|
If Java is working, you will see a pink rectangle above with one line of text that says something like:
Java Version 1.6.0_16 from Sun Microsystems Inc. or |
Troubleshooting: If you don't see a pink rectangle above, Java may not be installed. Or ZoneAlarm may be blocking the Java applet/program that displays the pink rectangle. Zone Alarm has a Mobile Code Control feature that, if set to "Custom", requires you to first enable mobile code from this web site (www.javatester.org). Mac users that find that Safari isn't launching Java should see the Safari Java broken forum posting at Macoshints.com regarding the "Open with Rosetta" option (thanks Eliot). In addition, your web browser may have Java disabled. See sample results.
| RECENT JAVA VERSIONS |
| Version 1.6.x. |
|
| Version 1.5.x |
|
In Windows, open a DOS prompt (a.k.a command window) and enter the following command
java -version
The output will look something like:
java version "1.6.0_03"
Java(TM) SE Runtime Environment (build 1.6.0_03-b05)
Java HotSpot(TM) Client VM (build 1.6.0_03-b05, mixed mode, sharing)
You can also use the command "java -fullversion" and produce output such as:
java full version "1.6.0_03-b05"
On a computer without any version of Java from Sun Microsystems installed, this results in an error message:
'java' is not recognized as an internal or external command, operable program or batch file.
A computer with only Microsoft's ancient version of Java installed, also produces the above error.
On a Windows machine with multiple versions of Java, according to Sun, this command returns the default JVM.
In Firefox version 3, do Tools -> Options -> Main tab -> Manage Add-ons button -> Plug-ins tab.
The screen shot below shows this from Firefox 3.08 on a Windows XP machine.
Another option, in Firefox versions 2 and 3, is to go to the address bar and enter:
about:plugins
If Java is installed there will be multiple Java entries. In Firefox 3 (at least on Windows XP) they are labeled "Java(TM) Platform SE x Ux" where the Xs represent version numbers. Back with Firefox 2 they were labeled either "Java (TM) Platform" or "Java Plug-in" (last verified with v 2.0.0.12).
On a Windows XP machine with Java version 1.6.0_03 installed, there were seven Java entries, all labelled "Java(TM) Platform SE 6 U3" which translates to Version 6, Update 3.
Back with version 1 of Firefox, the many Java entries showed different versions of Java. For more on how this used to work, see Multi-Version Support from Sun.
Advanced Options Tab
In Internet Explorer 6 and 7 do: Tools => Internet Options => Advanced tab and scroll down to about the middle of the options list. If a version of Java from Sun is installed, there will be a section in this list called "Java (Sun)". If Microsoft's Java is installed, there will be a section in this list called "Microsoft VM". If you see both, as the screen shot below (IE7 on Windows XP SP3) illustrates, then IE is using the one that is checked.
Sun Java Console
If a version of Sun's Java is installed, then do: Tools => Sun Java Console.
In both IE6 and IE7 this opens a new window that says "Java console" in the blue stripe at the top of the window.
The first two lines of the window display the version of Sun's Java, a sample is shown below.
JRE means Java Runtime Environment.
NOTE: Sometime between Java 1.6.0_07 and 1.6.0_13 Internet Explorer 7 lost the Sun Java Console option under Tools
on the menu bar (at least under Windows XP). The Java console is available by right clicking on the Java icon
in the system tray/notification area.
Java Plug-in 1.6.0_07
Using JRE version 1.6.0_07 Java HotSpot(TM) Client VM
Three ActiveX Controls
Another IE specific approach is to check the version of the ActiveX control/program that implements Java.
With Internet Explorer 7 do:
Tools => Internet Options => General tab
=> Browsing History Settings button => View Objects button
With Internet Explorer 6 do:
Tools => Internet Options => General tab
=> Settings button => View Objects button
This takes you to the folder where the ActiveX controls live. In Windows XP (for both IE6 and IE7) it is:
C:\Windows\Downloaded Program Files
At this point it gets messy.
The screen shot above is from IE7 on a Windows XP SP2 machine running Java 1.6.0_07.
You can right click on an ActiveX control and get its properties. For the most part, the properties display mirrors what you see above with two exceptions.
For the Microsoft JVM, you can get information from the jview command when entered at a DOS prompt. If you receive an error that no program by that name exists, then there is no Microsoft JVM on your computer. If output is displayed, the first line will look something like this:
Microsoft (R) Command-line Loader for Java Version 5.00.3802
Microsoft confuses things in that there are two "versions" at play here. The jview command displays the version of the Microsoft JVM which is independent of the version of Java that it implements (1.1.4). Microsoft may upgrade their JVM to fix bugs in the future, and this may result in a new version of their JVM, but it will still implement the ancient Java version 1.1.4.
Versions of the Microsoft JVM are identified by build numbers. The first line of the jview output has a version number in x.yy.zzzz format. The final four digits (zzzz) are the version number. On a fairly untouched Windows 98 SE machine, the version was 5.00.3167. As of November 2002, the latest version of the Microsoft JVM was 5.00.3805 (see Scot Finnie's newsletter, October 11, 2002). By December 2002, the latest version was 5.00.3809. As of April 2003, the latest version is 5.0.3810 and, as of July 2005, the latest version is still 3810. Microsoft Knowledge Base Article - 163637 INFO: Availability of Current Build of Microsoft VM has more on using the jview command.
Even if Microsoft's JVM is installed on your computer, your web browser may use a different JVM. Sun Microsystems describes another way to test for the presence of the Microsoft JVM. See How do I uninstall Microsoft Virtual Machine?
If the Java coffee cup is displayed in the System Tray (a.k.a Notification area) you can right click on it, select "About Java Technology" and get a display that looks like the one shown here (from Windows XP).
You can tell which, if any, versions of Sun's Java are installed using the Windows Control Panel. Note however, that just because Sun's Java is installed, does not mean that any particular web browser on your computer is using it. In the Control Panel, select Add/Remove Programs. What to look for in this list of installed programs varies.
In the old days such as Sun's Java version 1.4.2, the entry here looked like "Java 2 Runtime
Environment, SE v1.4.2._06". This meant that
version 1.4.2_06 is installed on the computer. I hadn't checked this in a
long time and it has changed for the worse. With Sun's Java version 1.5.0, look for an entry like;
"J2SE Runtime Environment 5.0 Update 6"
Leave it to Sun to confuse this as much as possible. I'll translate:
So, in English it means Sun's Java version 1.5.0_06
In some flavors of Windows, the System Information utility includes information about Internet Explorer. Among the data displayed is information on the Java Virtual Machine.
In Windows 2000 you run the System Information utility with:
Start -> Programs -> Accessories -> System
Tools -> System Information
Double Click on Internet Explorer in the left hand column, then click on Summary. The Java VM version is displayed. It is similar to the output from the jview command, but not exactly the same. On one computer jview displayed 5.00.3809 while the System Information utility displayed 5.0.3809.0.
The path to the System Information utility is the same in Windows XP as in Windows 2000. However, XP does not display Java version information (at least XP Home Edition SP1 does not).
In Windows 98SE, the path to the System Information utility is also the same as with Windows 2000. I ran it on two Windows 98SE machines. With a recent version of IE5, System Information included Internet Explorer information. With an old version of IE (5.00.2614.3500) it did not.
For Internet Explorer v6 using Sun's Java:
Enable the Java console with Tools => Sun Java Console. When the Java Console pops up, the version number is at the top.
A recent example:
Java Plug-in 1.5.0_10
Using JRE version 1.5.0_10 Java HotSpot(TM) Client VM
User home directory = C:\Documents and
Settings\youruserid
An old example:
Java(TM) Plug-in: Version 1.4.2_04
Using JRE version 1.4.2_04 Java HotSpot(TM) Client VM
Additional details, such as the Home Directory where the JVM is installed, are provided by typing "S" for System Properties.
When IE5 and IE6 are using Microsoft's Java, you can add the Java console to the View menu by:
Tools =>
Internet Options => Advanced tab => Scroll down to the Microsoft VM section
Then turn on the
checkbox for Java console enabled.
Enabling the Java console requires a restart of IE, not of Windows.
After enabling the Java console, select View => Java Console. This opens a new window, the first line of which, has information on the JVM version. This appears to be the same information reported by the jview command. Note however that the Java Console will also appear as an option when you select "View" in Windows Explorer.
On a machine running IE 6 with all patches applied as of December 2003 under Windows 2000 the output was:
On a machine running IE 5.5 SP2 under Windows 2000, the output was:
On a machine running IE 5.01 SP2 under Windows NT4 the output was:
In Mozilla 1.6, you enable the Java console with Tools => Web development => Java Console. If there is no Java Console option, then Java is not installed in your copy of Mozilla. When you turn on the Java Console, it displays the Java version at the top.
Netscape Navigator 4.x can also display the Java console. Click on
"Communicator", then "Tools", then "Java Console".
The first line of the Java console window identifies the vendor and version of
the JVM. Navigator 4.72, 4.78 and 4.8 said:
Netscape
Communications Corporation -- Java 1.1.5
This works however, only if Java is enabled. With Java disabled, a console
window is not opened.
The Other Testers page list other Java
Testers in addition to testers for Flash, QuickTime, and more.