« [Commentary] Top 10 Reasons why Servoy went Open Source | Main | [Tutorials] Install Subversion for Servoy 5 on Mac »
June 21, 2010
[Tutorials] How to Downgrade Java on a Mac
Why would you want to do this? Theoretically, never. Unfortunately, the latest Java update introduced a bug where the delete key removes two characters for the price of one. Hopefully they will release an update soon but since it has been a month or so now....
Instructions for v10.5.8 and v10.6.4
1 Recommend making a bootable backup before starting
2 Locate the required Java installers
- Leopard: download update 5
- Snow Leopard: grab your install DVD
3 Remove current installed java stuff (warning: no going back from this point on!). In terminal:
sudo rm -R /Applications/Utilities/Java\ Preferences.app/
sudo rm -R /System/Library/Frameworks/JavaVM.framework/
sudo rm -R /System/Library/Java/
sudo rm -R /System/Library/CoreServices/Jar\ Launcher.app
sudo rm -R /System/Library/CoreServices/Java\ Web\ Start.app/
sudo rm -R /System/Library/CoreServices/JavaVersion.plist
sudo rm -R /System/Library/PrivateFrameworks/JavaApplicationLauncher.framework/
sudo rm -R /System/Library/Frameworks/JavaEmbedding.framework/
sudo rm -R /System/Library/CFMSupport/StubLibraries/JavaEmbeddingLib/
4.1 Reinstall java: Leopard
- run the installer that you downloaded in step 1
- restart
4.2 Reinstall java: Snow Leopard (haven't tested yet! but should work)
- insert installer DVD
- run terminal commands (change the paths in each command as necessary for both the OS X Install disc and your system hard drive):
installer -verbose -pkg "/Volumes/Mac OS X Install Disk/System/Installation/Packages/Java.pkg -target /Volumes/Macintosh HD"
installer -verbose -pkg "/Volumes/Mac OS X Install Disk/System/Installation/Packages/JavaTools.pkg -target /Volumes/Macintosh HD"
- (alternately you can use a tool like Pacifist to browse for and run the Java.pkg and JavaTools.pkg installers located in the main .pkg installer)
- restart
Note: we have confirmed this works for Leopard but haven't verified for Snow Leopard yet.
| Posted by David Workman on June 21, 2010 at 10:45 AM in Tutorials | Permalink
Comments
Thanks for sharing, David.
Posted by: Ben Savignac | Jun 25, 2010 8:06:33 AM
Hi David,
thanks for posting, was exactly what I needed. However, re-installation of the old Java doesn't seem to work on Snow Leo. After the removal and re-installation, I run into the error (in terminal when typing "java -version":
Error occurred during initialization of VM
Unable to load native library: libjava.jnilib
Only way to get recovered is by re-applying the Java 6 update 2 from Apple, which apparently defeats the purpose. Any hints?
Posted by: Manuel Weiss | Jul 19, 2010 5:54:17 AM
Did you check your DYLD_LIBRARY_PATH environment variable? A quick search pulled up:
http://discussions.info.apple.com/message.jspa?messageID=9859349
http://stackoverflow.com/questions/1482450/broken-java-mac-10-6
So much for hoping someone would confirm the Snow Leopard instructions, sorry about that. If you figure it out, please post!
Posted by: David Workman | Jul 19, 2010 10:46:45 AM
http://lists.apple.com/archives/Java-dev/2010/Jul/msg00066.html for news on this from Apple.
Posted by: David Workman | Jul 22, 2010 4:22:56 AM
I have run into the same problem and my son has suggested this link: http://mike.crute.org/blog/java-woes-on-snow-leopard-10-6. I plan to try it out myself over the weekend but, as always, use at your own risk!
Posted by: Ben Savignac | Jul 28, 2010 8:12:47 AM
This seems to work on osx Lion:
unset DYLD_LIBRARY_PATH
Posted by: David Moshal | Sep 12, 2011 1:59:10 PM