As a non-Java developer, I am quit stuck in Java environment setting because I am not familiar with Java. I write it down as following, I think it is the best way to write it in /etc/profile: export JAVA_HOME=/usr/local/jdk1.8.0_111 export PATH=$JAVA…