How to set JAVA_HOME in Linux for all users
find /usr/lib/jvm/java-1.x.x-openjdk vim /etc/profilePrepend sudo if logged in as not-privileged user, ie. sudo vim Press ‘i’ to get in insert mode add:export JAVA_HOME=”path that you found” export PATH=$JAVA_HOME/bin:$PATH logout and login again, reboot, or use source /etc/profile to apply changes immediately in your current shell