I recently one of my projects to Spring 4.0.0.RELEASE
After deploying the project to my staging environment, I recognized an Exception with the following Message: bad major version at offset=6. My assumption is, that Sping 4 is not working with Java 6 (which I am forced to, because I can not change it on the system)
(Actually I even was not aware, that a JAR is depending on the Java Version)
System Requirements. Spring Boot 2.7. 2 requires Java 8 and is compatible up to and including Java 18.
Spring Framework 4.3 will be supported on Java versions up to Java 8. Spring Framework 5.0 had initial support for Java 9, and Spring Framework 5.1 requires JDK 8 and officially supports Java 11.
As you may have guessed, we're making extensive use of such arrangements within the Spring Framework codebase! The bottom line is that the choice is yours: We carefully designed Spring Framework 4. x to be naturally compatible with Java 6, 7 and 8, with the same Spring jars and no special setup steps.
Note that Hibernate 4.3 is a JPA 2.1 provider and therefore only supported as of Spring Framework 4.0.
Christian Rockrohr My assumption is, that Sping 4 is not working with Java 6
This is wrong assumption.
Spring requires JVM 1.6 or higher, as of Spring 4.0. *****
Spring remains compatible with older versions of Java and the JDK: Concretely, Java SE 6 (specifically, a minimum level equivalent to JDK 6 update 10, as released in late 2008) and above are still fully supported. However, for newly started development projects based on Spring 4, we recommend the use of Java 7 or 8.
Read also:
This look like running a Spring 4 application with JDK 1.5.
Confirmed:
Christian Rockrohr: Indeet, there is Java 1.5 installed on my AS400, it is not Java 1.6. That's is the reason, why Spring did not work. I just returned to Spring 3.1.0.RELEASE and it worked.
*****) http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/core/JdkVersion.html
jdk 1.6 update-18 or above(latest in 1.6 jdk is jdk-6u-45) versions will support spring 4.0
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With