As pointed out in $summary Java env variables are only set in interactive shells. This is especially problematic if you want to run java apps via ssh, e.g. restart a tomcat server via nagios event handler. Example: ---snip--- user@local:~>ssh remote 'env | grep JAVA' Password: user@local:~>ssh remote Password: user@remote:~>env|grep JAVA JAVA_HOME=/etc/java-config-2/current-system-vm JAVAC=/etc/java-config-2/current-system-vm/bin/javac user@remote:~> ---snip--- Java env variables are set in /etc/profile.d/java-config-2.sh which is only sourced from /etc/profile but not /etc/bash/bashrc. Maybe it's worth thinking about moving the code block ---snip--- for sh in /etc/profile.d/*.sh ; do if [ -r "$sh" ] ; then . "$sh" fi done unset sh ---snip--- from /etc/profile to /etc/bash/bashrc.
Nothing written by the team should rely on JAVA_HOME so if you you find something that does please open separate bugs for them.