As a Java developer who switches between *NIX systems (OS X, Ubuntu, ...), although I can always "get" my JDK up and running, it seems that there is no clear definition of JAVA_HOME in many packages which require JAVA_HOME to be set :
For example
- MAVEN : "JAVA_HOME, refers to your JDK directory"
- HADOOP : "JAVA_HOME, which specifies the path to the Java 1.5.x installation"
- SUN : "JAVA_HOME is the directory that contains the JRE"
I thus have 2 questions regarding this matter (any insights would be welcome, also, but concretely, I have these two questions) :
1) Does mac os X java installation copy the target from the "JavaVM.frameworks" directory into usr/bin ?
2) What is the "definition" of JAVA_HOME ? Clearly, we cannot define JAVA_HOME as simply "the place where java is installed", because this definition is ambiguous, since java can exist both in a HOME location (i.e. in /System/Library/Fraemworks/.....) , or alternatively, it may also be directly in the /usr/bin directory ?
MY THOUGHTS
I believe that JAVA_HOME is ACTUALLY meant to refer to more than just a binary "java" program. JAVA_HOME probably is meant to refer to the location of a set of java related directories AND binaries... But still, I am not really clear what this comprises, and wether or not this definition which I am proposing is precise enough to be useful.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…