当我尝试在google app服务器上的netbeans中运行示例项目时,出现以下错误。服务器无法启动。如果存在,我该如何解决这些错误?我正在使用netbeans 7.1
BUILD FAILED
W:\UnderTest\NetbeansCurrent\Guestbook\nbproject\build-impl.xml:550: The following error occurred while executing this line:
W:\UnderTest\NetbeansCurrent\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 "C:\Program Files\Java\jre7"
答案 0 :(得分:4)
安装jdk并将环境变量中的JAVA_HOME设置为安装jdk的路径。目前它指向jre。
答案 1 :(得分:1)
试试这个 - 暂时
Windows
netbeans.exe --jdkhome "c:\JDK\path"
Unix
netbeans --jdkhome /usr/bin/yourjdk
如果要永久设置选项,可以在netbeans.conf
文件中执行此操作。并改变。
# Default location of JDK, can be overridden by using --jdkhome <dir>:
netbeans_jdkhome="c:\your\JDK\path"
答案 2 :(得分:0)
可能的解决方案将会听到:setting jdk path in netbeans 或者,如果您在Windows环境中设置JAVA_HOME,则使用%JAVA_HOME%