« iCab 3.0.3 Beta 451 - Atomic | Main | Java String Concatenation »
Mon, Jun 04, 2007
Setting JAVA_HOME on Mac OS X
Once in a while the question arises how to set environment variables
on Mac OS X in a way that GUI processes can access them, too. In particular, some Java applications require a properly configured
JAVA_HOME
value.
Answer, part one: Download the preference pane RCEnvironment,
install it with a double click and set your variables (they're available after your next login). Yes, it's that easy:
Answer, part two: Use a correct value for JAVA_HOME
, which is usually
/Library/Java/Home
This alias (link) defaults to the Java version Apple wants most users to use (currently Java 5.0). Only if you have good reason to do so (for example, if you are a developer), you can set this variable to point at a specific version, e.g.
/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home
(latest Java 6 release) or/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home
(only Java 6.0, no later 6.x release)