配置如下:

export JAVA_HOME=/apps/jdk1.8.0_181

export PATH=$JAVA_HOME/bin:$PATH

export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar