There are 2 (or more) installations of java JDK?????

hfastedge

Registered
"whereis java" yields:
/usr/bin/java

yet.. it seems like the more used jdk is in /System/Library/Frameworks/JavaVM.framework/Versions/1.3/

This is quite unsettling.

According to "man whereis" :

The whereis utility checks the standard binary directories for the speci-
fied programs, printing out the PATHS of any it finds.

which suggests that the prog is not working right. Anyway...

I have no idea which one is the correct location for JAVA_HOME (the oh so important variable).

Thanks folks. I lov ya
 
Note that /usr/bin/java is a simple shell script; if you cat it, you'll see

#!/bin/sh
#
# Shell wrapper to launch java.
#
# Run java
#
exec /System/Library/Frameworks/JavaVM.framework/Versions/1.3/Commands/java "$@"

so you are actually using it under /System/Library/...
 
wow, that makes me feel a lot better.

I am glad that Apple doesnt have multiple installations around the system, that would be moronic.

I did not even think of opening up /usr/bin/java

Duh....


Just a question, suppose I set my JAVA_HOME var to /usr/bin/java, even though its a script, will that still work?
 
I'm not positive, but shouldn't JAVA_HOME point to the base directory for Java? Ie, for OS X,

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

or, since it contains bin and lib,

/System/Library/Frameworks/JavaVM.framework/Versions/1.3/Home
 
It is supposed to point to somewhere in /System/.... There's an Apple document discussing it somewhere. Sorry I don't know where. Maybe it was the Java release notes for OS X. They tell you exactly what the JAVA_HOME variable should be, if you need it.

-Rob
 
Back
Top