-1

This is the error that i get when i try to run the application based upon google app engine through netbeans. But i have set the JAVA_HOME variable :(see the pic)

enter image description here

BUILD FAILED
/home/non-admin/NetBeansProjects/Guestbook/nbproject/build-impl.xml:550: The following error occurred while executing this line:
/home/non-admin/NetBeansProjects/Guestbook/nbproject/build-impl.xml:300: Unable to find a javac compiler;
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-1.6.0-openjdk-1.6.0.0/jre"

Then why do i get the errors ?

Suhail Gupta
  • 22,386
  • 64
  • 200
  • 328

2 Answers2

0

Exporting environment variables in the terminal is only limited to your current terminal session. You should edit the .bashrc file in you home folder for a permanent solution.

Wesley Vrancken
  • 474
  • 6
  • 17
0

if you want to keep using jdk1.7, add java home to /home/yourname/.bashrc or /etc/profile file shell code:

export JAVA_HOME=/usr/java/jdk1.7.0_02
PATH=$JAVA_HOME/bin:$PATH

and run "source .bashrc" command.

if you only run one time, add env parameter. for example:

env JAVA_HOME=/usr/java/jdk1.7.0_02  mvn clean install
Liu guanghua
  • 981
  • 1
  • 9
  • 18