I need Java5 (not 6), but Snow Leopard comes with only Java6.
There is /System/Library/Frameworks/JavaVM.framework/Versions/1.5
, but that just points to 1.6.0
:
$ ls -la /System/Library/Frameworks/JavaVM.framework/Versions/
lrwxr-xr-x 1 root wheel 5 Sep 24 20:12 1.3 -> 1.3.1
drwxr-xr-x 3 root wheel 102 Jul 21 07:35 1.3.1
lrwxr-xr-x 1 root wheel 10 Sep 24 20:12 1.5 -> CurrentJDK
lrwxr-xr-x 1 root wheel 10 Sep 24 20:12 1.5.0 -> CurrentJDK
lrwxr-xr-x 1 root wheel 5 Sep 24 20:12 1.6 -> 1.6.0
drwxr-xr-x 7 root wheel 238 Sep 24 20:12 1.6.0
drwxr-xr-x 8 root wheel 272 Sep 24 20:12 A
lrwxr-xr-x 1 root wheel 1 Sep 24 20:12 Current -> A
lrwxr-xr-x 1 root wheel 3 Sep 24 20:12 CurrentJDK -> 1.6
Can I install the real 1.5 from somewhere?
Here is a link to downgrading Snow Leopard to Java 1.5
Hmm, i do not have installed 10.6 yet (it is on the way), but the versions directory looks strange. Where is 1.4? And no version should point to CurrentJDK! My 10.5 installation is the following:
r2d2:~ arne$ ls -l /System/Library/Frameworks/JavaVM.framework/Versions
total 56
lrwxr-xr-x 1 root wheel 5 16 Sep 19:14 1.3 -> 1.3.1
drwxr-xr-x 3 root wheel 102 14 Jan 2008 1.3.1
lrwxr-xr-x 1 root wheel 5 16 Sep 19:14 1.4 -> 1.4.2
lrwxr-xr-x 1 root wheel 3 21 Feb 2008 1.4.1 -> 1.4
drwxr-xr-x 8 root wheel 272 21 Feb 2008 1.4.2
lrwxr-xr-x 1 root wheel 5 16 Sep 19:14 1.5 -> 1.5.0
drwxr-xr-x 8 root wheel 272 21 Feb 2008 1.5.0
lrwxr-xr-x 1 root wheel 5 16 Sep 19:14 1.6 -> 1.6.0
drwxr-xr-x 8 root wheel 272 26 Sep 2008 1.6.0
drwxr-xr-x 8 root wheel 272 16 Sep 19:14 A
lrwxr-xr-x 1 root wheel 1 16 Sep 19:14 Current -> A
lrwxr-xr-x 1 root wheel 3 16 Sep 19:14 CurrentJDK -> 1.5
r2d2:~ arne$
Do other 10.6 users have the same problem? I am not shure about installing the Java 5 package for 10.5 will work on 10.6. Someone have experience?
Run java5 on Snow Leopard
Get the java 5 that was included in 10.5 "leopard" and unpack
cd /tmp/ curl -o java.1.5.0-leopard.tar.gz http://www.cs.washington.edu/homes/isdal/snow_leopard_workaround/java.1.5.0-leopard.tar.gz
tar -xvzf java.1.5.0-leopard.tar.gz
Move it to your System java folder (password needed)
sudo mv 1.5.0 /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0-leopard
Tell OS X that java 5 actually is java 5
cd /System/Library/Frameworks/JavaVM.framework/Versions/
sudo rm 1.5.0
sudo ln -s 1.5.0-leopard 1.5.0
sudo rm 1.5
sudo ln -s 1.5.0 1.5
I've put together a small how-to here.
I was receiving a 'Bus Error' when trying to use the steps at http://wiki.oneswarm.org/index.php/OS_X_10.6_Snow_Leopard on 10.6.6. However when I tried Sagacity's steps above. I was able to get 1.5 to run.
来源:https://stackoverflow.com/questions/1541876/java5-on-snow-leopard