0

I have set JAVA_HOME environment variable in .bashrc like this:

export JAVA_HOME='/opt/Oracle/jdk1.7.0_25'

And I am sure that it's properly set:

$ echo $JAVA_HOME
/opt/Oracle/jdk1.7.0_25

But when I am using NetBeans to start my Google App Engine server, it says:

...
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"

Why it is changed?

Yishu Fang
  • 9,448
  • 21
  • 65
  • 102

1 Answers1

0

The env variable is set in any bash window you might open up, but it is not set any other way. It seems you will have to resort to desperate measures to get this environment variable set up, which entails setting the variable from the command line and then starting NetBeans from the command line. I can't think of any other way.

tbodt
  • 16,609
  • 6
  • 58
  • 83