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/profileto apply changes immediately in your current shell