geegygee

Q: How do I make java 8 the default with os x 10.9.5

I have installed java 8 on OS 10.9.5 and it now appears in System Preferences. However, when I type the following in the command line:

java -version

it shows that I am using version 6:

java version "1.6.0_65"

How can I make version 8 the default? Thanks.

Posted on Oct 6, 2014 8:49 PM

Close

Q: How do I make java 8 the default with os x 10.9.5

  • All replies
  • Helpful answers

  • by lllaass,

    lllaass lllaass Oct 7, 2014 1:10 AM in response to geegygee
    Level 10 (190,258 points)
    Apple Watch
    Oct 7, 2014 1:10 AM in response to geegygee

    I would try reinstalling Java 8.

    Although

    Java for OS X 2014-001: How to re-enable the Apple-provided Java SE 6 web plug-in and Web Start features

    only discusses Java 7 it appears it would also apply to Java 8.

    Otherwise I would contact Java

  • by baltwo,Solvedanswer

    baltwo baltwo Oct 7, 2014 1:30 PM in response to geegygee
    Level 9 (62,256 points)
    Oct 7, 2014 1:30 PM in response to geegygee

    Try

     

    /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java -version

     

    That should give you:

     

    java version "1.8.0_20"

    Java(TM) SE Runtime Environment (build 1.8.0_20-b26)

    Java HotSpot(TM) 64-Bit Server VM (build 25.20-b23, mixed mode)


    If so, it's the default when needing SE 7 or 8.

  • by baltwo,

    baltwo baltwo Oct 8, 2014 4:55 AM in response to geegygee
    Level 9 (62,256 points)
    Oct 8, 2014 4:55 AM in response to geegygee

    thumbsup.gif

  • by liam1101,

    liam1101 liam1101 Sep 13, 2015 11:45 AM in response to baltwo
    Level 1 (4 points)
    Mac OS X
    Sep 13, 2015 11:45 AM in response to baltwo

    I have the same problem with 10.9.5  I've downloaded and installed Java 1.8u60 from Oracle. All went fine.

    When I drop to a terminal session, "java -version" reports 1.6.0_65

    When I run "/Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java -version," it reports 1.8.0_60

    That's not good. When I'm at the command line, I need the default Java to be 1.8

     

    I noticed that the Oracle installer did nothing to  the Java-related symlinks in /usr/bin; they're still pointing to /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java which is still /System/Library/Java/JavaVirtualMachines/1.6.0.jdk

     

    The OSX version still exists in /System/Library/Java/JavaVirtualMachines/1.6.0.jdk

    Oracle put Java in /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk

     

    Do I simply alter the symlink /System/Library/Frameworks/JavaVM.framework/Versions/Current to put to /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk?

     

    I'm not looking for "a" solution; I'm looking for the correct one, i.e. one that won't break other Java-related things.

    Thanks!

  • by baltwo,

    baltwo baltwo Sep 13, 2015 1:32 PM in response to liam1101
    Level 9 (62,256 points)
    Sep 13, 2015 1:32 PM in response to liam1101

    You don't need to do anything. Both SE 6 & 8 JREs can coexist on your machine. When required, the OS will choose the appropriate JRE to make things work.