开发者

How to downgrade JRE/JDK on Mac OSX?

Does anyone know how to downgrade the version for JRE/JDK from 1.6.0_24 to 1.6.0_18 on开发者_Go百科 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.


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/


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


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...


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.


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.


Which version of firefox are you running?

I believe you can have more than one version of jdk/jre on a machine as long as you specify the path when compiling/running. However, the jvm is bundled with mac which makes this problematic.

This post may be helpful

How to install a specific JDK on Mac OS X?


These days MAC OS comes with latest java version(8 or later).

Even if you install the old versions, it points to the Newest version. All it need is just pointing to the old version. To downgrade to any version that is preinstalled is to create a symlink of that version.

Follow these simple steps to downgrade your java version.

   (1) cd /System/Library/Frameworks/JavaVM.framework/Versions

   (2) sudo bash

   (3) rm Current

   (4) ln -s 1.6.0/Contents/ Current

   (5) java -version

This will point the java to last update in java6. And now update all the paths.

Hope it might be helpful and let me know if it works...:)


There is no downgrade mechanism for what you want to do.

The typical suggestion is to roll back to the version you want either through Time Machine or by reinstalling and only update selectively to the version you need by downloading explicitly from Apple and not updating Java through software update.

I'd recommend you look into the problem instead. If you cannot run this in Firefox, then try with Chrome or Safari. If it is the mixed code issue, then this is changed in the Java Settings panel in Programs -> Utilities in the Advanced panel.


I've had the very same problem. You can open the JRE 1.6.0_20 image file with Pacifist software and extract all the folders with the framework into the \System\Library\Frameworks\JavaVM.framework\Versions folders. After that the JRE should appear in your Applications/Utilities/Java Preferences JRE selection menu, where you can switch between the running JRE's.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜