Resolved Apple Java 6 for 10.11

Discussion in 'OS X El Capitan (10.11)' started by TheralSadurns, Jun 8, 2015.

  1. TheralSadurns, Jun 8, 2015
    Last edited: Jun 9, 2015

    TheralSadurns macrumors 6502

    Joined:
    Jul 8, 2010
    #1
    Did anyone figure out a way how to install Apple's Java 6 on a machine running 10.11?

    I keep getting this error:
    "This application requires the legacy Java SE 6 runtime which is unavailable for this version of OS X."

    I have Java 8 JDK Update 45 installed on my computer.
    See Terminal java -version:
    "
    java version "1.8.0_45"

    Java(TM) SE Runtime Environment (build 1.8.0_45-b14)

    Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)"



    Trying to install Java for OS X 2014-001 which is the latest release of Apple's Java (that I know of at least) I get this error:
    "Java for OS X 2014-001 can't be installed on this disk. A never version of this package is already installed."
    Screen Shot 2015-06-09 at 07.50.40.png


    Does anyone have an idea?


    Update:

    Solution:
    https://oliverdowling.com.au/2014/03/28/java-se-8-on-mac-os-x/
     
  2. DFZD macrumors regular

    Joined:
    Apr 6, 2012
    #2
  3. mcmul macrumors 6502

    Joined:
    Dec 14, 2009
    #3
    Is your Mac specifically for development purposes or do you use it for personal use as well? I tend to put development boxes into individual VMs to separate any nastiness or surprises from my main system.
     
  4. DFZD macrumors regular

    Joined:
    Apr 6, 2012
    #4
    I've a couple of other macs so that's not an issue. But it's a real PITA that we'll have to wait the mighty oracle to update JRE to have this sorted. It could take weeks.
     
  5. maflynn Moderator

    maflynn

    Staff Member

    Joined:
    May 3, 2009
    Location:
    Boston
    #5
    Its good to know that Java is having issues, because I need java on my machine and losing the ability will cause issues. I'm still rocking with Yosemite, so its good to be safe then sorry.
     
  6. DFZD macrumors regular

    Joined:
    Apr 6, 2012
    #6
    El Capitan is having issues with java, would be a huge understatement, considering that there's no java command line tools for the latest OSX.
     
  7. Superhai macrumors regular

    Superhai

    Joined:
    Apr 21, 2010
    #7
    Java 6 is deprecated, the release notes states that (always suggested readings before installing a beta).
     
  8. nesl247 macrumors member

    Joined:
    Jun 14, 2008
    Location:
    Florida
    #8
    Just to give the exact text from the release notes. Java 6 for 10.11 probably hasn't been built yet.
     
  9. DFZD macrumors regular

    Joined:
    Apr 6, 2012
    #9
    Release notes also state that 10.11 is the last major version to support it. So I think it's oracle's turn to release an update.
     
  10. nesl247 macrumors member

    Joined:
    Jun 14, 2008
    Location:
    Florida
    #10
    Oracle won't be building it, Apple will. Java 6 is maintained by Apple for OS X. The Oracle versions started when Apple stopped maintaining it.

    Apple probably has to recompile it for 10.11, and do some testing. For the first developer preview, it probably wasn't a huge concern to make sure it was done beforehand.
     
  11. DFZD macrumors regular

    Joined:
    Apr 6, 2012
    #11
    Any idea on when we can expect Apple to release an update? I think waiting for the Public Beta would be too stupid.
     
  12. nesl247 macrumors member

    Joined:
    Jun 14, 2008
    Location:
    Florida
    #12
    I don't work for Apple, so I have no idea. I would imagine within the next week. I don't recall if it was immediately available for previous DP1 releases. I seem to remember having to wait a few days.
     
  13. DFZD macrumors regular

    Joined:
    Apr 6, 2012
  14. TheralSadurns thread starter macrumors 6502

    Joined:
    Jul 8, 2010
    #14
    I have the solution. Finally!

    It's actually Oracle's fault because heir installer does NOT configure Java 7, 8, or the pre-release 9 correctly.

    On the internet you find a lot of people talking a lot of bull about this or similar issues. But here I finally found:
    a) a good explanation of he issue
    b) an easy solution

    https://oliverdowling.com.au/2014/03/28/java-se-8-on-mac-os-x/
     
  15. dotNes macrumors newbie

    dotNes

    Joined:
    Jun 10, 2015
    Location:
    Belgium
    #15

    This doesn't seem to work on my fresh 10.11 build. I have Java SE 1.80.45 installed but my Adobe Flash Builder still is searching for the legacy 1.6 version. I couldn't add the 2 folders proposed in the Jan 2015 update as well because of no permissions. How can I grant myself permissions to add these folders?
     
  16. w0lf, Jun 10, 2015
    Last edited: Jun 11, 2015

    w0lf macrumors 65816

    w0lf

    Joined:
    Feb 16, 2013
    Location:
    USA
    #16
    Code:
    sudo nvram boot-args="rootless=0";osascript -e 'tell app "loginwindow" to «event aevtrrst»'
    
     
  17. dotNes macrumors newbie

    dotNes

    Joined:
    Jun 10, 2015
    Location:
    Belgium
    #17
    Thanks for that w0lf. I did manage to add these folders with your solution and I'm a little step closer to opening Flash Builder (4.6) on 10.11. However, I now get a message: Failed to create Java Virtual Machine. Any suggestions?
     
  18. TheralSadurns thread starter macrumors 6502

    Joined:
    Jul 8, 2010
    #18
    The "Failed to create Virtual Machine" message generally appears when you did NOT create the alias to the library file as per the manual.
    At least for me it was like that.
    Also bear in mind that you have to change the terminal commands listed there to match your java version!
     
  19. macman191 macrumors newbie

    Joined:
    Jun 10, 2015
    #19
    Following the steps verbatim at https://oliverdowling.com.au/2014/03/28/java-se-8-on-mac-os-x/ including the Jan 2015 update worked perfectly for me. I was trying to run Charles.app on OS X 10.11 and had same issues as OP. Of course I am using jdk1.8.0_45 (instead of jdk1.8.0_40 as referenced in the article) so had to change the paths. And yes, needed w0lf's comment above to be able to do the steps in Jan 2015 update.
    Thanks you all!
     
  20. oliverdowling macrumors newbie

    oliverdowling

    Joined:
    Jun 10, 2015
    Location:
    Australia
    #20
    Hi guys, I noticed I was getting a lot of traffic, so I updated my post for the latest version of Java, and added a note for El Capitan's Rootless mode down the bottom.

    I think it would be better to recommend disabling Rootless mode and to restart manually. Some users might not realise that the above command will restart their computer and might be in the middle of something.

    Code:
    sudo nvram boot-args="rootless=0"
    To enable Rootless mode again you can use

    Code:
    sudo nvram -d boot-args
     
  21. TheralSadurns thread starter macrumors 6502

    Joined:
    Jul 8, 2010
    #21
    Now that you are here personally...

    let me thank you! And this is a big thanks indeed!

    All over the Internet people are talking about this Java on OS X issue in various ways... but nobody ever really got to the bottom of it, explained what is really going on, AND has an easy to understand and viable solution!

    You my dear friend are a freakin' (digital) lifesaver! And I applaud you for sharing your knowledge with the world! Much appreciated!
     
  22. w0lf, Jun 11, 2015
    Last edited: Jun 11, 2015

    w0lf macrumors 65816

    w0lf

    Joined:
    Feb 16, 2013
    Location:
    USA
    #22
    You're right but I bet there's most likely way more people who would complain it doesn't work because they didn't reboot.

    Code:
    ba=$(nvram boot-args | sed -E "s/boot-args|rootless=.//g");
    sudo nvram boot-args="rootless=0$(if [[ $ba = *[!\ ]* ]];then printf " ";echo ${ba[*]};fi)";
    osascript -e 'tell app "loginwindow" to «event aevtrrst»'
    And likewise completely removing boot-args is probably not recommended either because that removes all boot-args a user has set and not just rootless.

    Code:
    ba=$(nvram boot-args | sed -E "s/boot-args|rootless=0//g");
    sudo nvram boot-args="$(echo $ba)"
    These probably aren't a perfect solution either.
     
  23. dotNes macrumors newbie

    dotNes

    Joined:
    Jun 10, 2015
    Location:
    Belgium
    #23
    Followed the guide multiple times without any luck. I can confirm jdk 1.8.0_45 is correctly installed but eclipse is still spitting out this error:
    Code:
    JavaVM: Failed to load JVM: /Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/bundle/Libraries/libserver.dylib
    JavaVM FATAL: Failed to load the jvm library.
    
    Strange thing is, the symlink is in place but still not being able to load the library. Restarting didn’t solve my problem either. I then tried placing a reference to libserver.dylib directly in Flash Builder's Info.plist file but this returned following error:
    Code:
    dlopen(/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/server/libjvm.dylib, 2): no suitable image found. Did find:
    /Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/lib/server/libjvm.dylib: no matching architecture in universal wrapper
    
    Hope you guys can help me with this. Thanks in advance!
     
  24. toonetown macrumors newbie

    Joined:
    Nov 29, 2012
    #24
    I was actually able to get java6 installed (and it seems to work) by doing the following:
    1. Disable rootless (boot to recovery partition, choose Utilities | Security Configuration and turn it off)
    2. Install homebrew and homebrew cask (http://caskroom.io)
    3. Install the homebrew cask versions tap (brew tap caskroom/versions)
    4. Edit the java6 cask (brew cask edit java6) and save it
      • Remove the line that says it requires <= yosemite
    5. Install the java6 cask (brew cask install java6)
      • It will ask for your sudo password and then it will install
    After doing that, I re-enabled rootless and things seem to be working just fine (I also, however, have java7 and java8 installed via the homebrew cask methods...you don't need to disable rootless or modify the casks to install those two versions).
     
  25. dotNes macrumors newbie

    dotNes

    Joined:
    Jun 10, 2015
    Location:
    Belgium
    #25
    Finally managed to get Java SE 6 installed on El Capitan.
    I used Pacifist to install the Java 6 package, since cask threw me an error saying that java 6 could not be installed because of a newer version was installed on my machine (Also after deleting all jdk's from my machine). After Pacifist had placed the java 6 files on it's place, I reran the "brew cask install java6" command in terminal. And this made it work correctly! Thanks for all your help guys!


    Code:
    $ brew cask install java6
    ==> Downloading http://support.apple.com/downloads/DL1572/en_US/JavaForOSX2014-0
    Already downloaded: /Library/Caches/Homebrew/java6-1.6.0_65.dmg
    ==> Running installer for java6; your password may be necessary.
    ==> Package installers may write to any location; options such as --appdir are i
    Password:
    ==> installer: Cannot install on volume / because it is disabled.
    ==> installer: A newer version of this package is already installed.
    Error: Command failed to execute!
    
    ==> Failed command:
    ["/usr/bin/sudo", "-E", "--", "/usr/sbin/installer", "-pkg", "#<Pathname:/opt/homebrew-cask/Caskroom/java6/1.6.0_65/JavaForOSX.pkg>", "-target", "/"]
    
    ==> Output of failed command:
    installer: Cannot install on volume / because it is disabled.
    installer: A newer version of this package is already installed.
    
    Installed Java 6 package using Pacifist at this point.

    Code:
    $ java -version
    Unable to locate a Java Runtime to invoke.
    $ brew cask install java6
    ==> Downloading http://support.apple.com/downloads/DL1572/en_US/JavaForOSX2014-0
    Already downloaded: /Library/Caches/Homebrew/java6-1.6.0_65.dmg
    ==> Running installer for java6; your password may be necessary.
    ==> Package installers may write to any location; options such as --appdir are i
    Password:
    ==> installer: Package name is Java for OS X 2014-001
    ==> installer: Upgrading at base path /
    ==> installer: The upgrade was successful.
      java6 staged at '/opt/homebrew-cask/Caskroom/java6/1.6.0_65' (64M)
    $ java -version
    java version "1.6.0_65"
    Java(TM) SE Runtime Environment (build 1.6.0_65-b14-466.1-11M4716)
    Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-466.1, mixed mode)
    
     

Share This Page