Java For El Capitan

OS X El Capitan and Java: No Fun (till now!)

How do you downgrade Java version on MacOSX El Capitan? Right now when I run java -version I get: java version '9.0.1' Java(TM) SE Runtime Environment (build 9.0.1+11) Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode) I need to have it say. Java se 6 runtime el capitan. Java se 6 runtime el capitan, java runtime environment mac el capitan Unduh Root Checker Apk Direct Entry. Java for macOS 2017-001 installs the legacy Java 6 runtime for macOS 10 13 High Sierra, macOS 10. You may recall from the days of OS X 10 7 Lion that Apple used to provide the Java. Here’s how to uninstall Java from El Capitan & Sierra using Terminal in OS X. Firstly you need to disable Rootless SIP in OS X. Restart your Mac when the screen turns black hold down ⌘R until the Apple logo appears. Select the “Utilities” menu and then “Terminal”. In Terminal type: csrutil disable.

There's been a bunch of stuff on the interwebs lately about El Capitan and Java issues... here's the simple simple, condensed version of the fix:

Quick prereq to the post:

I have, for some time, had the following line in ~/.bash_profile under my login on my machine:
Java For El CapitanI see it this way... /System/Library/Frameworks/JavaVM.framework/ relies on a set of symlinks that, in turn, rely on /Library/Java/Home being another symlink that points to the Home directory of an installed JVM. Changing the /Library/Java/Home symlink ensures that all of that other machinery (legacy or otherwise) continues to work correctly.
At the very least with this setup typing 'java -version' at the command line gives me the version I'm looking for. And swapping symlinks to point to real disk locations is fairly easy... it makes it MUCH easier to change JVM versions. Just repoint the symlink to
/Library/Java/JavaVirtualMachines/{jvm_folder}/Contents/Home
and Bob's your uncle... it's done. And no other changes necessary.
So I selected to base this all on /Library/Java/Home being The Correct Location For The Current JVM.
As I said... the above line is in a file called .bash_profile under /Users/{username}. If you have to create it be sure that afterward you open terminal and run
cd ~
chmod u+x .bash_profile
and then restart terminal. That will ensure that JAVA_HOME is always set when you hit Terminal. This makes many things lots easier, but most of all, since most Java packages will check for JAVA_HOME and only go looking for a JVM if not set, it gives you control over the Java version being used to run whatever it is you are trying to run.

So...

That's why I chose to set JAVA_HOME to /Library/Java/Home and proceed as I have.

Download and install Legacy Java 6SE from Apple:

https://support.apple.com/kb/DL1572?locale=en_US

Download and install Java 8 JDK from Oracle:

http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

Change a system symlink to make the Java 8 JVM the command line default:

cd `echo $JAVA_HOME`
sudo rm Home
sudo ln -s /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home ./Home

Once done, test with the following command on the command line:

java -version
If you've done the above correctly your Java apps will launch and your command-line tools (oh, like launching Tomcat) will automatically use the latest JVM.

OH, also... once you've installed the Java 8 JDK you may have to do two other things:

Edit the Java JDK PLIST

Edit the file at /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Info.plist to be:
<key>JVMCapabilities</key>
<array>
<string>CommandLine</string>
<string>JNI</string>
<string>BundledApp</string>
</array>

Add a symlink to point to libserver.dylib

It seems the Oracle installer doesn't create a necessary symlink for the JDK, so you'll need to copy/paste the following commands (there's 2 of them, btw):
sudo mkdir -p /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/bundle/Libraries
sudo ln -s /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre/lib/server/libjvm.dylib /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/bundle/Libraries/libserver.dylib

Give thanks to Oliver from Australia!

Dude is my hero and this wouldn't have happened without his blog post. However he's missing the J2SE 6 install and download and has a bunch of other stuff in there that isn't really relevant anymore.
So, dude... here's your linkback:
https://oliverdowling.com.au/2014/03/28/java-se-8-on-mac-os-x/

'Great tutorial. Thank you for concise directions to get me running with Java on my new iMac.'A.M., May 3, 2010

'Thank you so much for this tutorial! I am new to programming and have never written any code on my mac before now. This was very helpful!'M.A., August 29, 2010

'Great tutorial.'W.C., October 8, 2009

'Great tutorial! Many thanks, this is really helpful for a programming assignment in a computer network class I'm taking.'Z.L., October 6, 2009

'Great tut omg thanks so much!'S., October 4, 2009

'I love this tutorial! Thank you!'S.R., March 4, 2009

'Fantastic!!!!! Thank you very muchhhhh!! I can start mac programing now. The tutorial is great!!!'F., November 8, 2008

'Incredibly clear to follow, Thanks very much'J.G., October 1, 2008

Java 8 El Capitan

'Très bon tutorial, merci beaucoup'K., November 7, 2007

'This is exactly the information I was looking for!! Great job explaining how to use the Jar Bundler. I always wondered how to group my files into a single 'app' file.'J.L.M., July 6, 2007

'Thanks for the tutorial.'D.W., June 6, 2007

'Great tutorial! Thank You very much!'T., May 19, 2007

'This is a very good developement friendly site'A.K., March 18, 2007

'Thankyou, I am very happy to read your content for MacJava. Thankyou very much'A., January 12, 2007

'Very Good!!!!'D.A., August 10, 2006

'Great article - I found it very helpful! Thanks!'J.T., August 1, 2006

'Hello, Great information, thank you very much! Can I translate your article in french?'P.T., January 21, 2006

'Great article!'D., December 9, 2005

'Thank you so much. Your instructions are perfectly concise. There is plenty of information about programming, but not nearly enough about installing and packaging. This page is a blessing.'S.B., October 21, 2005

'This is a great info on mac application builder'S.S., October 11, 2005

'sweet article! one of the clearest and simplest ive seen and everything just works!!'J.B., September 9, 2005

'Amazing, I would never have thought it was that easy... You are truely the best!'M.F., September 7, 2005

'Couldn't be more clearer!'M.H., August 13, 2005

'THX a lot - very helpful and direct to the point'T.W., August 9, 2005

Java For El Capitan 10.11.6

'Cool -- you solved the mystery!'C.M., June 27, 2005