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.
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.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Coder Trainee
Experienced in Java and Python, we share and learn together. For submissions or collaborations, DM us.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
