4

A system-wide way to set or get $JAVA_HOME in Ubuntu?

view full story
linux-howto

http://unix.stackexchange.com – I wonder whether Ubuntu itself provides a system-wide way to find the current JAVA_HOME or whether there is right place for setting JAVA_HOME. Mac OS X does well in this, for /usr/libexec/java_home command returns the current JAVA_HOME. But to Ubuntu, the materials I found always told me to set the $JAVA_PATH pointing to a static path like ```, which is stored in~/.bash_profile```. I think, however, this approach has several drawbacks: Once Java updates, the mini version number will change, which makes the static path no longer available. After changing the JRE used in my system with upd (HowTos)