On a computer with multiple web browsers, be sure to check the Java version in every browser. I say this because multiple copies of Java can sometimes be installed with different browsers using different copies. Also, Java can be enabled in one browser and
disabled in another.
Note: The portion of Java that runs programs is referred to as either the Java Run-time Environment (JRE) or the Java Virtual Machine (JVM).
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.7.0_60 from Oracle Corporation or
Version number translation: 1.6.0_34 is, in English, Java 6 Update 34|
The initial "1" is ignored as is the third digit. Ask Oracle why.
|RUNNING THIS APPLET: Java security has changed quite a lot over the years and running this
applet has gotten much more complicated.|
In part this is because the applet is unsigned. In the Bizarro world of Oracle, unsigned applets are treated as more dangerous than signed applets. This is backwards for two reasons. First, unsigned applets run in a restricted Java sandbox whereas signed applets are given unrestricted access to the system. Yes, the sandbox has been buggy and broken, but some security is better than none. Second, it shows a faith in the Certificate Authority system that is unwarranted.
As of Oct 2014 and Java 7 Update 71 and Java 8 Update 25, the applet above can be run with Java set to the default "high" security level. There will be assorted "as you sure" type prompts both from Java and your web browser, but it will run. However, this site, javatester.org, needs to first be added to the "Exception Site List" using the Java Control Panel. When adding sites to the list, you have to prefix them with HTTP colon slash slash. Java will object to HTTP but it will accept it. There is no HTTPS version of this site. Also, if you add "javatester.org" to the list, you must then go to "javatester.org" as "www.javatester.org" will fail.
Because it is unsigned, this applet will not run with Java set to the "very high" security level.
|NEW SECURITY IN JAVA 7 UPDATE 51: January 27, 2014. |
Update 51 changed the default security rules for unsigned Java applets such as the one on this page. By default, Java no longer runs any unsigned applets. In the Java control panel, the default security level with Update 51 is "High" which Oracle describes as "Java applications identified by a certificate from a trusted authority will be allowed to run". What this does not say is that unsigned applets will not run, at least not by default. If you get an error on this page that says "Application blocked by security settings" this is probably why.
One way to run an unsigned applet is to lower the security level to "Medium". The other way is to add trusted websites to a new exception list that Oracle/Java maintains. This list is not to be confused with the list of trusted applets that Firefox or Chrome maintains. Yes, there are now three lists of applets that are naughty and nice.
|YOUR BROWSER LIES: Java 7 Update 10 introduced a new checkbox that disables the use of Java in all browsers.
By and large, this is a good thing, but there seems to be a failure to communicate between Java and many web
browsers. As a result, all the browsers I have tried so far incorrectly report that Java is not installed when, in fact,
it may be installed but this new security feature has been enabled. |
As of Java 7 Update 71 and Java 8 Update 25 this is still true on Windows machines. Interestingly, if Java is disabled system-wide for use in web browsers (its on the Security) tab, both Chrome and Firefox will not even show the Java plug-in as being installed. On the flip side, Firefox 33 on Windows 7 reports that "Browser has Java disabled" when Java is not installed.
|JAVA VERSION HISTORY (Wikipedia has this too)|
| Java 7 (a.k.a version 1.7.x)
Java 7 was the default for new installations from May 31, 2012 until Oct. 14, 2014
Java 7 users will be auto-updated to Java 8 in early 2015
See the official Oracle Release history for Java 7
Java 8 became the default on Windows on Oct 14, 2014. See the Java 8 FAQ
Java 8 is not officially supported on Windows XP but should work.
Oracle has a release history for Java 7 and 8.
JAVA 6 (a.k.a Version 1.6.x)
Java 6 is dead (unless you pay for bug fixes), laid to rest in April 2013 .
On May 3, 2012 Java 7 replaced Java 6 as the default for new installations.
See the Release Notes for every version of Java 6
End of Life (EOL) was originally scheduled for Feb 2013. More on this here and here and here.
Java, like any normal Windows application, shows up in the list of installed programs in the Control Panel. In Windows XP, select Add or Remove Programs. In Windows 7, click on Programs and Features. Note however, that just because Java is installed, does not mean that any particular web browser on your computer is using it. Java can be disabled system-wide or disabled in one particular browser.
For Java version 6, the Name column displays a user-friendly "Java (TM) 6 Update 37". This would appear at the top of this page as "1.6.0_37". The version column, under Windows 7, displays this same version information as 6.0.370. Yes, three different formats for the same information. This is typical with Java.
Java 7 appears as "Java 7 Update 10" in the Name column, but the version is 7.0.100.
In old days, Java version 1.5.0, looked like: "J2SE Runtime Environment 5.0 Update 6". J2SE meant Java. Runtime Environment refers to the JVM (Java Virtual Machine). 5.0 meant 1.5.0. Update 6 refered to the version of version 1.5.0. In English, it meant Java version 1.5.0_06. Way back, with Sun's Java version 1.4.2, the Control Panel entry looked like "Java 2 Runtime Environment, SE v1.4.2._06". This meant that version 1.4.2_06 was installed on the computer.
The Control Panel also offers access to the Java Control Panel (the "Java" entry). On the General tab, click the About button to see the installed version. This works for both Java 6 and Java 7.
Java 6 (from Apple, not Oracle) was pre-installed on Snow Leopard. Java 7 is not available.
To see the installed version of Java 6, go to the Applications -> Utilities folder and run the Java Preferences program.
Another way to see the Java version is with the
java -versioncommand in Terminal.
NOTE: Java 6 is updated on Snow Leopard using the standard Software Update feature of the operating system.
According to Oracle (Note for Users of Macs that Include Apple Java 6 Plug-in) there can be multiple copies of Java 6 installed. They say: "If you have not yet installed Apple's Java Mac OS X 2012-006 update, then you are still using a version of Apple Java 6 that includes the plug-in and the Java Preferences app. ... The Applications -> Utilities -> Java Preferences application is part of Apple's implementation of Java ... Under Apple's implementation of Java, it was possible to have multiple JREs installed, and the Java Preferences app was used to determine the first compatible version that would be used."
The situation on Lion (10.7) and Mountain Lion (10.8) is confusing. Java was not pre-installed by Apple. These systems can have either Java 6, Java 7 or both installed. Java 6 comes from Apple, Java 7 from Oracle. Each works a bit differently. For example, there can be multiple copies of Java 6 installed, but Java 7 only allows a single version. At the time this was written, I did not have access to a Mac running Lion or Mountain Lion, so I can not personally verify the below.
If Java 6 is the only installed version of Java, then determining its version is probably the same on OS X 10.7 and 10.8 as documented above for 10.6. However, Java 6 is able to run applets in web pages on Snow Leopard (10.6) but not in Lion (10.7) and Mountain Lion (10.8).
According to Oracle, there are two ways to determine the installed version of Java 7:
% /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java -version
John Martellaro at Macobserver says that you can learn the installed version of Java 7 from the Java Control Panel (System Preferences -> Java). Go to the Java tab and click on the View button.
Updating Java 7: Java does not yet self-update. While the checking for new versions is automatic, the actual software update is manual. From the Apple menu, chose System Preferences, then View, then Java to see the Java Control Panel. Go to the Update tab and click on the Update Now button.
A Mac that was upgraded from Java 6 to Java 7 is the most confusing case. In October 2012, Paul Ducklin of Sophos wrote "Keeping track of which Java version you have, and whether it's the latest and most secure, can be a bit tricky, especially for Apple users." He notes that after the update, Java applications default to using version 6, whereas online applets default to version 7.
Apple's Java 6 was able to run applets (Java programs in web pages) on Lion and Mountain Lion until October 2012, when Apple upgraded Java 6 from Update 35 to Update 37 (see the Java for OS X 2012-006 update). According to Oracle, the 2012-006 update from Apple uninstalled the Apple-provided Java applet plug-in from all web browsers. This meant that to run Java applets on websites, Mac users needed to install Java 7 from Oracle. But the story does not end there.
Apple offers instructions (How to re-enable the Apple-provided Java SE 6 applet plug-in and Web Start functionality) on how to disable Java 7 and re-enable the Java 6 browser plug-in. And Oracles Mac OS X Platform Install FAQ has instructions for running Java 6 on an OS X system that has Java 7 installed, in a command line environment.
Note 1: An installed JRE from Oracle will not appear in the Java Preferences.app.
Note 2: If you are viewing this page with the Chrome browser on an OS X system with Java 7 installed, the applet at the top of the page will not work. This is because Java 7 on Lion and Mountain Lion is 64 bit, while Chrome is 32 bit. Java 7 on Lion and Mountain Lion works with Safari and Firefox.
Note 3: Oracles JRE 7 Installation for Mac OS X points out that Java 7 on a Mac is installed on a system wide basis, for all users, and that administrator privileges are required. Java 7 cannot be installed for a single user.
Note 4: Java 7 Update 6 and later requires OS X 10.7.3 (Lion) or later.
On Windows XP, open a command window and enter the following command
The output will look something like:
java version "1.6.0_31"
Java(TM) SE Runtime Environment (build 1.6.0_31-b05)
Java HotSpot(TM) Client VM (build 20.6-b01, mixed mode, sharing)
You can also use the command "java -fullversion" and produce output such as:
java full version "1.6.0_17-b04"
As of Windows 7, this no longer works (not sure about Vista). It produces the error shown below, which is also produced on an XP machine without any version of Java from Oracle installed.
'java' is not recognized as an internal or external command, operable program or batch file.
(1) Mozilla, the company behind Firefox, has a plugin checker page that both reports the installed version of Java and whether it is "up to date" or "outdated" (last verified with Firefox 18). Java 7 Update 10 is reported as "Java(TM) Platform SE 7 U10". Java 6 Update 37 is reported as "Java(TM) Platform SE 6 U37".
(2) In Firefox 18, do Tools -> Add-ons, then click on Plugins in the left side column. Java 6 Update 37 will display as "Java(TM) Platform SE 6 U37 6.0.370.6". It will also say "Next Generation Java Plug-in 1.6.0_37 for Mozilla browsers". Java 7 Update 10 will display as "Java(TM) Platform SE 7 U10 10.10.2.18". It will also say "Next Generation Java Plug-in 10.10.2 for Mozilla browsers".
(3) In Firefox 18, you can enter go to the address bar and enter:
Java 7 Update 10 is identified here as "Java(TM) Platform SE 7 U10." Java 6 Update 37 is identified here as "Java(TM) Platform SE 6 U37".
If the Java coffee cup is displayed in the Windows System Tray (a.k.a Notification area) you can right click on it and select "About Java Technology" to open a window showing the installed version of Java. The display of this Java icon is optional and can be configured in the Java Control Panel on the Advanced tab. In my experience, the default is to display the icon in Java 6 but suppress it in Java 7.
of Java installed.See their advice
on using the script. DeployJava usage is described in the deployment toolkit script. The following sample script will check and see if the proper
version of Java is installed and will display a message if not.