tags:

views:

42

answers:

1

Hi ,

I am developing an application in cocoa which uses some java classes .I need to set the app point to

/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0

instead of:

/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK.

Is it possible to do this..

Thanks in advance

A: 

Not a solution, just wanted to point out that your problem (which is I guess that your app does not run with Java6, but needs Java5) may be bigger than you think, because on Snow Leopard, these two directories are the same:

$ ls -la /System/Library/Frameworks/JavaVM.framework/Versions/
total 64
drwxr-xr-x  13 root  wheel  442 Dec  5 12:16 .
drwxr-xr-x  12 root  wheel  408 Dec  5 12:16 ..
lrwxr-xr-x   1 root  wheel    5 Dec  5 12:15 1.3 -> 1.3.1
drwxr-xr-x   3 root  wheel  102 Jul 21  2009 1.3.1
lrwxr-xr-x   1 root  wheel   10 Dec  5 12:15 1.4 -> CurrentJDK
lrwxr-xr-x   1 root  wheel   10 Dec  5 12:15 1.4.2 -> CurrentJDK
lrwxr-xr-x   1 root  wheel   10 Dec  5 12:15 1.5 -> CurrentJDK
lrwxr-xr-x   1 root  wheel   10 Dec  5 12:15 1.5.0 -> CurrentJDK
lrwxr-xr-x   1 root  wheel    5 Dec  5 12:15 1.6 -> 1.6.0
drwxr-xr-x   8 root  wheel  272 Oct 19 10:54 1.6.0
drwxr-xr-x   9 root  wheel  306 Dec  5 12:16 A
lrwxr-xr-x   1 root  wheel    1 Dec  5 12:15 Current -> A
lrwxr-xr-x   1 root  wheel    3 Dec  5 12:15 CurrentJDK -> 1.6

It does seem possible, though, to copy the real Java5 over from a 10.5 installation.

Thilo
Hi,Thanks Thilo ,Is it possible to set jave compile version in xcode?,I already modified version in buil.xml file to 1.5.Is that ok?
Sreelal
No. Snow Leopard doesn't come with 1.5. You can install 1.5 in an un-supported way, see http://www.macosxhints.com/article.php?story=20100123192950640. But beware: Java 1.5 app you build won't run on other Snow Leopard machines.
Yuji
Yuji is right. If possible, rather than trying to fix the OS, try to fix your Java app, so that it can run with the default Java. What exactly is the problem with CurrentJDK?
Thilo