Error:java: System Java Compiler was not found in classpath: java.lang.ClassNotFoundException:

After replaced java jdk version, idea runs aware of this problem, a beginning to think there is no set JAVA_HOME set logout later re-open the computer to no avail,

Online said a change Settings> java compiler> javac into eclipse if so useful, I do not write this blog, I want to change eclipsek hair can be used, but it seems to only be for java8 I have here is also an option for you choose

Another position:

step 1: selecting the files you want to use jdk version - project structure 

 Here, I chose jdk10 

step2   取消 Use compiler from module target JDK when possible 选项

 Click ok just fine

The reason: IDEA remembers jdk directory used before, when the last version you are using jdk Uninstall to remove, idea or record exists, it will go to the last version of the javac address, so it bad Yeah, we let him find himself, I specify what you use, you use what you have, nice, comfortable. .

over

Guess you like

Origin blog.csdn.net/qq_38190111/article/details/90203902