Java environment setup on Debian by using /etc/profile.d
This is a replacement of Install JavaSDK and apache-tomcat on Debian - Shammerism.
The script files located at /etc/profile.d/ are invoked during boot. I generate javaenv.sh.
JDK installation step is same as above article.
javaenv.sh
export JAVA_HOME="/usr/local/src/java/jdk1.7.0_67" export JDK_PATH="$JAVA_HOME/bin" export PATH="$PATH:$JDK_PATH"