好像是因为重装了jdk出现的这个问题,但是myeclipse中运行正常,idea会各种报错
jdk配置已经设置好了,cmd中运行java -version正常
idea报错信息如下:
Error:java: System Java Compiler was not found in classpath:
java.lang.ClassNotFoundException: com.sun.tools.javac.api.JavacTool
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
。。。。。。。。。。。。
已经百度过了,仍然找不到答案
Delete the configuration directory in eclipse, restart eclipse, and try again.
If it still doesn’t work, set JAVA-HOME in the environment variable to the path of jdk. If it existed before, overwrite it.
If it still doesn’t work, set the bin path in the environment variable path to the bin in the jdk directory (not the jre directory). If it exists before, overwrite it. Try again.
Look at the java complier settings under settings/build, Execution, Deployment/complier?
I also encountered this problem. There is a problem with lib