Java Home on Mac

The shortest symlink to Java home (pointing to where the JDK is installed) is:

/Library/Java/Home

To set the JAVA_HOME env var:

export JAVA_HOME=/Library/Java/Home

But that only applies for the current session. To persist it, add it as entry in ~/.profile. Check that it's set:

echo $JAVA_HOME

0 komentar:

Posting Komentar