Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

When trying to use my online bank, I was directed to the Java update site (again). I downloaded and installed Java 7 update 17, and the installer reported that everything was a-ok. Clearly, that was something of lie.

Now, when I try to check my Java version on http://java.com/en/download/testjava.jsp, it says that "An old version of Java has been detected on your system". I have tried installing the update again, but the results remain the same. I have also tried rebooting.

On the command line, java -version reports

java version "1.6.0_43"

Java(TM) SE Runtime Environment (build 1.6.0_43-b01-447-11M4203)

Java HotSpot(TM) 64-Bit Server VM (build 20.14-b01-447, mixed mode)

I remember that there used to be some kind of settings where I could choose between installed Java versions, but now I cannot find it. Under "System preferences" there is no mention of Java, and when I search for Java in Spotlight, the only application that comes up is Java VisualVM, whatever that is.

Any ideas as to what might be wrong?

I am running OS 10.8.3 on an Intel Core i3 iMac with 4 GB RAM.

share|improve this question
    
Does the Java version shown from testjava say what version it is? The java from the command line can be different and has been explained on AskDifferent. And the old Java change version has been removed. –  Mark Apr 9 '13 at 19:27
    
No, the testjava website says nothing about which version I (supposedly) have. –  Eyvind Apr 9 '13 at 20:06
    
WHich exact JRE 7 update 17 did you install? and have you followed any of the links below the tester –  Mark Apr 9 '13 at 23:12
add comment

1 Answer

The problem is that you have two Java Runtime Environments (JREs) installed on your system, Apple's 1.6.x and Oracle's 1.7.x. As evidenced by running java -version JRE 1.6 is the default JRE on your system. You likely want to change the default JRE to Oracle's 1.7 JRE.

You are correct in that there used to be a System Preference for setting the default JRE. Apple removed that as part of the Java Mac OS X 2012-006 update. The new way for selecting the default JRE is to use the /usr/libexec/java_home command. Read the java_home man page as well as the Determining the Default Version of the JDK section of this Oracle page for more info on how to specify the default JRE.

share|improve this answer
    
However that does not give the version of the JRE that is used for applets. You can have different versions for applets and for /usr/bin/java –  Mark Apr 9 '13 at 23:11
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.