How to add JAVA_HOME on Ubuntu?
On Ubuntu, we can add JAVA_HOME environment variable in /etc/environment file. Note /etc/environment system-wide environment variable settings, which means all users use it. It is not a script file, but rather consists of assignment expressions, one per line. We need admin or sudo to modify this it. Further Reading Ubuntu – EnvironmentVariables 1. JAVA_HOME 1.1 …