java JAVA_HOME 未指向 JDK:无法启动 google 应用程序引擎
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10780283/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
JAVA_HOME does not point to the JDK : Unable to start google app engine
提问by Suhail Gupta
I get the following errors when i try to run a sample project in netbeans on google app server. The server doesn't start up. How can i resolve these errors if they exist ? I am using netbeans 7.1
当我尝试在 google 应用服务器上的 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"
采纳答案by alexey28
Install jdk and set JAVA_HOME in environments variables to path that you jdk was installed. Currently it points to jre.
安装 jdk 并将环境变量中的 JAVA_HOME 设置为您安装 jdk 的路径。目前它指向jre。
回答by Sumit Singh
Try this- for temporary
试试这个 - 暂时
Windows
视窗
netbeans.exe --jdkhome "c:\JDK\path"
Unix
Unix
netbeans --jdkhome /usr/bin/yourjdk
If you want to set the option permanently,you can do so in the netbeans.conf
file. and change .
如果您想永久设置该选项,您可以在netbeans.conf
文件中进行设置。和改变。
# Default location of JDK, can be overridden by using --jdkhome <dir>:
netbeans_jdkhome="c:\your\JDK\path"
回答by Forhad
probable solution will be hear : setting jdk path in netbeansor , if you setting JAVA_HOME in windows env then use %JAVA_HOME%
可能的解决方案是:在 netbeans 中设置 jdk 路径,或者,如果您在 windows env 中设置 JAVA_HOME,则使用 %JAVA_HOME%