Configuring IntelliJ IDEA using Java 1.8 / 1.7 and the solution "java: System Java Compiler not found in classpath"

Let a short story. Here's what happened:

  • IntelliJ 12 CE is downloaded and installed.
  • The latest version of Java 1.7 / 1.8 has been downloaded and installed.
  • JDK has been configured to create and run a project

I came across the following strange error:

Error: java: System Java Compiler was not found in classpath 

This was despite the fact that I fully installed Java 1.7 / 1.8 and had no problems working through the terminal.

+8
java classpath intellij-idea macos
source share
2 answers

The solution that fixed my problem was as follows:

IN:

Project Settings> Compiler> Java Compiler

I changed the Use compiler drop-down list from Javac to Eclipse !

No other solutions were found that I found on the Internet. Hope this helps you, my unfamiliar reader.

IMPORTANT: THIS IS NOTHING TO DO ANYTHING WITH MY JAVA_HOME, AS IT WAS INSTALLED CORRECTLY.

+14
source share

You need to set the JAVA_HOME environment variable. The IDE will check this variable at startup.

And enter the path to the home directory of the installed JDK. After it starts, you must specify the JDK used to start the IDE. In this case, the new compiler will be available among the already configured compilers. You can always configure any new compiler using the IDE compiler options.

+2
source share

All Articles