How does one install set the JAVA5_HOME environment variable for Google Guava libraries on Mac OS 10.5.8?
+1
A:
Add the following line to the end of /etc/profile
(requires sudo
access):
export JAVA5_HOME=/System/Library/Frameworks/JavaVM.framework/Home
If you have open terminal windows, you'll probably need to close and reopen them for this change to take effect.
Asaph
2010-01-15 23:29:38
Actually, it's probably something more like /Library/Java/Home. But otherwise, that's the way to do it.
amphetamachine
2010-01-15 23:42:08
@amphetamachine: Updated path. Thanks.
Asaph
2010-01-16 00:29:50
A:
It should probably be set to:
/System/Library/Frameworks/JavaVM.framework/Versions/1.5/Home
You can do this in your shell configuration file using something like:
export JAVA5_HOME='/System/Library/Frameworks/JavaVM.framework/Versions/1.5/Home'
mipadi
2010-01-16 00:10:12
Don't set `JAVA_HOME` (or `JAVA5_HOME`) link to a specific version. The Java Preferences app on OSX dynamically points to different versions under different conditions. By setting to a specific version you may be asking for trouble.
Asaph
2010-01-16 00:25:58
It won't cause trouble if an app specifically *needs* Java 5. If your Java Preferences are set to Java 6, but an app used from the command line *requires* Java 5, then you do need to set `JAVA_HOME` (or `JAVA5_HOME`) to the actual location.
mipadi
2010-01-16 03:30:44