-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 ?

4

2 回答 2

0

在终端中导出环境变量仅限于您当前的终端会话。您应该编辑主文件夹中的.bashrc文件以获得永久解决方案。

于 2012-05-28T08:15:04.953 回答
0

如果您想继续使用 jdk1.7,请将 java home 添加到 /home/yourname/.bashrc 或 /etc/profile 文件 shell 代码:

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

并运行“source .bashrc”命令。

如果只运行一次,请添加 env 参数。例如:

env JAVA_HOME=/usr/java/jdk1.7.0_02  mvn clean install
于 2012-05-28T08:23:20.743 回答