Java classpath in Cocoa
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 thi开发者_JAVA百科s..
Thanks in advance
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.
精彩评论