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

Error: JAVA_HOME is not defined correctly executing maven

Assuming you use bash shell and installed Java with the Oracle installer, you could add the following to your .bash_profile This would pick the correct JAVA_HOME as defined by the Oracle installer and will set it first in your $PATH making sure it is found. Also, you don’t need to change it later when updating Java. EDIT As per the … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)