java 1.5 in Snow Leopard
Recently I've installed Snow Leopard as my main system and found out that there is no JDK 1.5 in the system - only 1.6.
Sadly, one of my project needed to be build with JDK 1.5 because I deploy it in jetty container which is running in 1.5 jvm. Happily, I was able to transfer JDK 1.5 from my other notebook with Leopard, so now I have both 1.5 and 1.6 versions of java in Snow Leopard.
Below goes instructions how to do it:
user@leopard% cd /System/Library/Frameworks/JavaVM.framework/Versions
user@leopard% zip -9ry ~/java.zip 1.5.0...
user@snow-leopard% sudo -s
root@snow-leopard# cd /System/Library/Frameworks/JavaVM.framework/Versions
root@snow-leopard# scp user@leopard:~/java.zip .
root@snow-leopard# rm -f 1.5*
root@snow-leopard# unzip java.zip
root@snow-leopard# ln -s 1.5.0 1.5
Now, system utility called "Java Preferences" can be used to manage java version. However, it failed to set correct JDK for my maven from macports, so I had to
root@snow-leopard# rm -f CurrentJDK && ln -s 1.5.0 CurrentJDK
after doing so everything went smoothly
July 20th, 2009 - 16:46
Can you send me the java.zip file? I dont have an other mac where to get this from and i cant work without 1.5
August 23rd, 2009 - 15:27
Anything that uses the command line won’t be affected by the Preferences app. I believe the Preferences app controls how the JavaApplicationStub works but when you are using the command line it’s the shellscript for the program you’re using that going to use either JAVA_HOME or some other variation to locate the specific version of the java it wants to use. If none is set it might use “java” and that’s where your symbolic link comes into play. Either way I would rely on just the symlink I’d pin the application to the specific version of the VM whenever you can.
August 24th, 2009 - 21:28
It worked for me (actually without the last command). My problem was related to BookSmart.
Thanks!
August 24th, 2009 - 21:31
@notiv
You are welcome
August 29th, 2009 - 09:17
There are also more instructions with a download of the JVM located here:
http://wiki.oneswarm.org/index.php/OS_X_10.6_Snow_Leopard
August 30th, 2009 - 04:53
Hi, I just installed snow leapard and I cannot run booksmart, you said your problem was also booksmart. Is there any advice you can share? thanks.
September 1st, 2009 - 21:13
I don’t get it, can someone please tell me how to do this, I pasted all that info into the java preferences. Someone pleas e-mail me or answer back asap please i need this soon.
September 1st, 2009 - 23:17
I was able to accomplish the same thing as this article via TimeMachine. First, I did move the existing 1.5* symlinks aside by renaming them. Then I used TimeMachine to restore the two 1.5* targets from TimeMachine (the “1.5″ being a symlink). Then I used “Java Preferences” to drag the two 1.5 targets to the head of the list. Until I did that, the problem I was having remained.
Thanks for the tips!
September 3rd, 2009 - 06:45
Thanks so much for these tips. I had two programs disabled by the absence of Java 1.5 with the Snow Leopard upgrade: Vuze (Azureus) and SPSS 16.0. Both can be updated or upgraded to Java 1.6 / Snow Leopard compatible versions, but there may be a substantial fee to upgrade SPSS to the newer PASW. I used the TimeMachine method to restore the “1.5″ symlink folder and “1.5.0″ folder from Leopard. SPSS opened, but didn’t work properly until I also restored the “CurrentJDK” symlink folder as well. Now I can choose between Java 1.5 and 1.6 with Java Preferences and the two applications are working, although Vuze shows some minor glitches. Once I have all Snow Leopard compatible software, I imagine I could use Pacifist to reinstall the original Snow Leopard Java folders from the OS X install disc.
September 3rd, 2009 - 09:31
@Sammy Sucu
I tried this with a fresh install, but it didn’t work, so I just moved the entire SPSSInc folder from my (Leopard) backup, and together with the Java fix, it worked! See: http://foreninger.uio.no/dms/foreninger/fu/arkiv/2009-09-spssogmac.html
September 23rd, 2009 - 13:58
Почему Вы так редко новые публикации добавляете?
October 8th, 2009 - 00:13
This is great, very good job, it’s easy and works very well, thanks for sharing,