This post is a wiki. Anyone with karma >750 is welcome to improve it.

What exactly did you put into /etc/environment? This looks like you did something like PATH=<path-to-jre> instead of PATH=$PATH:<path-to-jre>. ( 2016-02-03 03:04:55 -0600 )edit I added these three statements in that file: export PATH=$PATH:/opt/jdk1.8.0_72/bin:/opt/jdk1.8.0_72/jre/bin export JRE_HOME=/opt/jdk1.8.0_72/jre export JAVA_HOME=/opt/jdk1.8.0_72
Hm...funny, just also did to try to extend my \$PATH through /etc/environment which cut off /usr/local/bin and /usr/bin giving me the same errors. I think best would be to remove these entries from /etc/environment again and put the settings into a seperate file in /etc/profile.d/ or use the alternatives method.