Intellij Error: Spring class file has wrong version 61.0, should be 55.0



Intellij is a very smart IDE, but unlike any other ide you are still smarter than it, so whenever a problem arises when using the IDE and the ide doesn’t have the clue what is the problem, you are the one who is responsible for fixing it. The IDE just gives you a pointer of the error, with hundreds of possibilities that can cause it.

For starters or even a developer that uses Spring boot frequently, it’s still quite ambiguous problems that often prevent us from starting to develop the project further because it’s the beginning of creating the project.

Currently the default Spring version when creating a project using Start.spring.io is Spring boot v3.x. And that is to use Java 17. But if you have multiple projects in your working computer that use older versions of Java, upgrading to java 17 is not convenient. So that becomes the problem, because Spring 3x must use Java 17, but in my current COmputer i set it to Java 11.

How to fix Intellij class file has wrong version 61.0, should be 55.0
Basically if you encounter any Error class file that has the wrong version, it means you are not using the right version of JDK, the solution is just upgrade your JDK similar or higher than the required version by your library or framework you are using. But in this case, I don't want to change my JDK because I have multiple projects that need a lower JDK version, so I have to use the lower version of the framework.

Results/Conclusion and Reference
The conclusion of this problem is the following:
For Spring boot 3x use JDK 17
For Spring boot 2x you can use JDK 11 or even 8

Here some Java class version code for reference:
JDK 17 the class version is 61
JDK 16 the class version is 60
JDK 15 the class version is 59
JDK 14 the class version is 58
JDK 13 the class version is 57
JDK 12 the class version is 56
JDK 11 the class version is 55
JDK 10 the class version is 54
JDK 9 the class version is 53
JDK 8 the class version is 52

Popular posts from this blog

ERROR 1348 Column Password Is Not Updatable When Updating MySQL Root Password

How To Create Spring Boot Project Using Netbeans

Spring Kafka - How to use ReplyingKafkaTemplate send and reply synchronously