## 举个设置JAVA_HOME的例子
> You can set your JAVA_HOME in /etc/profile
> But the preferred location for JAVA_HOME or any system variable is /etc/environment.
> Open **/etc/environment** in any text editor like nano or gedit and add the following line:
>> JAVA_HOME="/usr/lib/jvm/open-jdk"
> (java path could be different)
> Use **source** to load the variables, by running this command:
>> source /etc/environment
> Then check the variable, by running this command:
>> echo $JAVA_HOME
### Update
> Usually most linux systems source /etc/environment by default.
If your system doesn't do that add the following line to ~/.bashrc (Thanks @pje)
>> source /etc/environment