-------------------------------Linux-----------------------------------
JAVA_HOME=/usr/jdk1.8.0_281
export JAVA_HOME
CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/lib/tools.jar
export CLASSPATH
PATH=$JAVA_HOME/bin:$PATH:$HOME/bin
export PATH
-------------------------------Windows-----------------------------------
JAVA_HOME(新建)
值:C:Program FilesJavajdk1.7.0_291
ClassPATH(新建)
值:.;%JAVA_HOME%libdt.jar;%JAVA_HOME%lib ools.jar
PATH(在原有的PATH后面进行属性追加下面的值)
值:;%JAVA_HOME%in