JAVA_HOME does not point to the JDK : Unable to st

2019-03-16 17:34发布

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

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"

3条回答
Rolldiameter
2楼-- · 2019-03-16 17:58

Try this- for temporary

Windows

netbeans.exe --jdkhome "c:\JDK\path"  

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 .

# Default location of JDK, can be overridden by using --jdkhome <dir>:
netbeans_jdkhome="c:\your\JDK\path"
查看更多
男人必须洒脱
3楼-- · 2019-03-16 18:00

probable solution will be hear : setting jdk path in netbeans or , if you setting JAVA_HOME in windows env then use %JAVA_HOME%

查看更多
叛逆
4楼-- · 2019-03-16 18:05

Install jdk and set JAVA_HOME in environments variables to path that you jdk was installed. Currently it points to jre.

查看更多
登录 后发表回答