A system-wide way to set or get $JAVA_HOME in Ubuntu?
A little hacky, but put this line in your /etc/profile
for setting it system-wide:
export JAVA_HOME=$(dirname $(dirname $(readlink -e /usr/bin/javac)))
A little hacky, but put this line in your /etc/profile
for setting it system-wide:
export JAVA_HOME=$(dirname $(dirname $(readlink -e /usr/bin/javac)))