I am looking to create a new web application using spring boot. Unfortunately my server is fairly locked down in terms of the technology stack. It has java 5 installed on it.
Can anyone tell me whether spring boot can run on java 1.5 and what version?
thanks
Although you can use Spring Boot with Java 6 or 7, we generally recommend Java 8 if at all possible.
Spring 5 supports Java EE 7 and also compatible with Java EE 8. So we can use Servlet 4.0, Bean Validation 2.0, JPA 2.2 in our applications. We can also use their older versions i.e. Servlet 3.1, Bean Validation 1.1, JPA 2.1. Spring 5 applications preferred server versions are Tomcat 8.5+, Jetty 9.4+ and WildFly 10+.
Spring Boot 2.7. 4 requires Java 8 and is compatible up to and including Java 19.
Spring Boot 2.7. 1 (and therefore the latest Spring Framework 5.3. 22) supports Java 17 while also remaining compatible with Java 11 and 8.
Since Spring boot 1.0.0, the minimal requirement to run a Spring boot application has been Java 6. This can also be found in the reference guide of Spring boot 1.0.0:
Spring Boot can be used with “classic” Java development tools or installed as a command line tool. Regardless, you will need Java SDK v1.6 or higher.
Support for older Java versions has been dropped throughout releases, with Spring boot 1.3 moving to Java 7 as a baseline (still possible to use Java 6 with additional configuration) and Spring boot 2.x moving to Java 8 as a baseline. Additionally to what the documentation says, none of the Spring boot 1.x versions support Java 9 or higher.
Summarized:
So, the answer is that it's not possible to run in Java 5.
For Spring Boot 2.0, the requirement is Java 8 as a minimum version.
From the Spring Boot 2.0 release notes :
Spring Boot 2.0 requires Java 8 as a minimum version. Many existing APIs have been updated to take advantage of Java 8 features such as: default methods on interfaces, functional callbacks, and new APIs such as javax.time. If you are currently using Java 7 or earlier, you’ll need to upgrade your JDK before you can develop Spring Boot 2.0 applications.
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