1 Download right JDK and install it.
2 Set JAVA_HOME system variable pointing to the JDK installation directory.

解决方案 »

  1.   

    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 
    JAVA_HOME 设置错误或者你根本没有设置。或者你设置为了JRE的目录,请修改为JDK的目录。
      

  2.   

    JAVA_HOME 没有设置
    或者指向了JRE 的目录请正确是指JDK的目录