我已经像这样设置JAVA_HOME
环境变量.bashrc
:
export JAVA_HOME='/opt/Oracle/jdk1.7.0_25'
而且我确信它设置正确:
$ echo $JAVA_HOME
/opt/Oracle/jdk1.7.0_25
但是当我使用 NetBeans 启动我的 Google App Engine 服务器时,它会说:
...
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK.
It is currently set to "/usr/lib/jvm/java-7-openjdk-amd64/jre"
为什么会改变?