Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to downgrade JRE/JDK on Mac OSX?

Tags:

java

macos

Does anyone know how to downgrade the version for JRE/JDK from 1.6.0_24 to 1.6.0_18 on a Mac OSX thru Terminal? I need to downgrade in order to get a Java applet working in Firefox. Any help would be much appreciated.

like image 877
jrutter Avatar asked Jun 20 '11 13:06

jrutter


5 Answers

That does not seem to be accurate any more.

I just managed to downgrade both JRE and compiler from Java 8 to 7 by looking into /Library/Java/JavaVirtualMachines, and moving away the directory with the highest version number, e.g.

sudo mv jdk1.8.0.jdk ~/Desktop/
like image 159
Johannes Ernst Avatar answered Nov 03 '22 10:11

Johannes Ernst


That's easy. You have to remove de .jdk directory of the JDK 7 in /Library/Java/JavaVirtualMachines. Now you only have to install the version you like. =)

More info: http://docs.oracle.com/javase/7/docs/webnotes/install/mac/mac-jdk.html#uninstall

like image 41
David Avatar answered Nov 03 '22 09:11

David


If the older JDK isn't on your machine, you'd need to use the GUI and download the Java updater. The one closest to yours I could find was for Java 1.6.0_15 for Mac OS 10.5 (you didn't mention which Mac OS X version you were running):

Java for Mac OS X 10.5 Update 5

I didn't see any for Mac OS X 10.6. For that, you would probably have to download the updaters for each 10.6 release, and extract the JDK installer from the updater (using something like Pacifist

Oh, and if you haven't already, try running /Applications/Utilities/Java Preferences.app, which lets you change the default Java on your machine amongst the ones you have installed.

Hope this helps...

like image 29
Eric Avatar answered Nov 03 '22 09:11

Eric


I removed the JavaAppletPlugin: /Library/Internet Plug-Ins/JavaAppletPlugin.plugin

and all 1.8 JDKs: /Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk

Then I was able to re-install 1.7.

like image 4
Randy Avatar answered Nov 03 '22 08:11

Randy


To downgrade your JDK you will need the JDK installation package and an app called Pacifist, available from http://www.charlessoft.com/ . The usage is pretty straight forward. I have used it to downgrade my JDK before.

like image 3
Stefan Avatar answered Nov 03 '22 08:11

Stefan