Fix ‘Cannot access org.springframework.boot.SpringApplication’ After IDEA Upgrade

After upgrading IntelliJ IDEA, a Java project fails with the error ‘cannot access org.springframework.boot.SpringApplication – class file has wrong version 61.0’, which can be resolved by adjusting Maven runner settings to delegate IDE build actions to Maven and restarting the IDE.

Coder Trainee
Coder Trainee
Coder Trainee
Fix ‘Cannot access org.springframework.boot.SpringApplication’ After IDEA Upgrade

Problem

After updating IntelliJ IDEA, the project fails to compile with the error:

java: cannot access org.springframework.boot.SpringApplication
Error: class file has wrong version 61.0
Location: D:\maven-repository\org\springframework\boot\spring-boot\3.0.0\spring-boot-3.0.0.jar(org/springframework/boot/SpringApplication.class)

The error indicates that the compiled class targets a newer Java version (Java 17, class file version 61) than the current compiler supports.

Solution

Open File → Settings → Build, Execution, Deployment → Build Tools → Maven → Runner and change the Maven runner configuration. Specifically, enable the option Delegate IDE build actions to Maven (experimental) . After applying the change, restart the IDE and rebuild the project.

This forces Maven to handle compilation with the appropriate Java version, eliminating the class‑file‑version mismatch.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

JavaMavenspring-bootIntelliJ IDEAClass version error
Coder Trainee
Written by

Coder Trainee

Experienced in Java and Python, we share and learn together. For submissions or collaborations, DM us.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.