0

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". what is the solutions for this?

4 Answers 4

0

you have to set CLASSPATH environmnet varible : C:\Program Files\Java\jdk1.7\lib (path may be vary according to your jdk version). Check below link: http://docs.oracle.com/javase/tutorial/essential/environment/paths.html

0

You need a JDK to compile. "C:\Program Files\Java\jre7" indicates that JAVA_HOME points to a JRE

0

Your eclipse is unaware of the jdk location in your system and more over, it seems you dont have jdk in your system. Download "jdk" and point your eclipse to the jdk. (windows-> preference-> installed jres -> add new JVM)

0

Download latest JDK and create/edit JAVA_HOME and Path. To do this:

1. Right Click MyComputer
2. Click Properties >> Advance System Settings
3. Then in the pop up bottom right corner click Environment variables
4. Edit JAVA_HOME = C:\Program Files (x86)\Java\jdk1.6.0_31 >> OK
5. Edit Path = C:\Program Files (x86)\Java\jdk1.6.0_31\bin; >> OK
6. OK

enter image description here

1
  • If this is the solution please vote up or check mark green, which means thread is resolved. Thanks
    – paul
    Sep 24, 2013 at 7:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.