4

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"
Suhail Gupta
  • 20,940
  • 62
  • 185
  • 313

3 Answers3

4

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

alexey28
  • 5,040
  • 1
  • 19
  • 25
  • [is that ok](http://i49.tinypic.com/14t7seh.jpg). But i have been developing and compiling my java apps from netbeans and also from command prompt.I never got a problem – Suhail Gupta May 28 '12 at 06:50
  • yes, should be ok. Some application does not nead jdk, jre also contains javac and java to compile and run your application. But gae neads. – alexey28 May 28 '12 at 06:53
1

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"
Sumit Singh
  • 24,095
  • 8
  • 74
  • 100
0

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

Asraful
  • 1,171
  • 15
  • 30