IntelliJ could not initialize class org.jetbrains.jps.builders.JpsBuildBundle

Viewed 13393

I'm using IntelliJ for a Spring Boot application made with the Spring Boot Initializr. Added are two dependency's: Spring Web and REST Repositories. Now that I try to build the main class, I get an error saying:

Could not initialize class org.jetbrains.jps.builders.JpsBuildBundle

The configuration is the one given by IntelliJ and I tried updating my JDK to version 16 but sadly it didn't work.

Also I'm working on a MacBook Pro with the M1 chip (don't know if it could have anything to do with the problem, but couldn't hurt mentioning it).

4 Answers

I had the same issue when trying to build freshly created Spring initializr project with java version 16.

Didn't want to reinstall idea (since other projects worked just fine).

Solution to fix that was to change back to java 15 (in pom.xml and project structure(project SDK, modules))

Intellij details

IntelliJ IDEA 2020.3.1 (Ultimate Edition)
Build #IU-203.6682.168

Got a simple solution, just uninstalled and installed again the Idea.

I'm using IntelliJ IDEA and These are the steps that helped me:

  1. Click on file in the upper left corner
  2. Click on Project Structure and a new window will be opened enter image description here
  3. Then change your version from 16 to 15 or try some other versions and see what works out for you.
  1. Go to the file click project structure
  2. In the window change the JDK version to older (15 is suitable or less) IntelliJ change project JDK version
  3. System properties->Advanced->Environment variables->system variables
  4. click JAVA_HOME
  5. change the variable value to (C:\Program Files\Java\jdk-15.0.1)
Related