Not getting option of Java 8 or Java 11 version or spring version 2.x in spring starter project STS 4

2.3k views Asked by At

I was working on STS 4.8.1(spring tool suite) which was supporting java version 8 & 11 and spring version 2.7.x I worked on few projects. I mistakenly updated the version, since then neither i am getting the option of java version 8 or 11 nor spring version 2.X i.e. version 2. The spring starter project gives only Java 17 & 21 option and spring 3.X option only. I have set compiler to 1.8 of java and also set Installed jre to jdk 8.Still the only option i get is of java 17 and 21 and spring version of 3.x only. Not getting older version option in STS 4. I have deleted it again installed but issue remain same. I have deleted and installed many version of STS 4. I am still facing the issue. I am stuck with this issue for last 3-4 days. Please help me to resolve the issue.

I have deleted the STS $ and reinstalled it but issue is not resolved yet. I have tried other version of STS 4 but no help. Either my system has som issue of i am doing some silly mistake

2

There are 2 answers

2
Martin Lippert On BEST ANSWER

The Spring Starter Wizard in the Spring Tooling for Eclipse uses https://start.spring.io behind the scenes and therefore offers exactly what https://start.spring.io offers. This is not related to the version of the Spring Tools, as this information (Spring Boot versions of choice, JDK versions, etc.) is queried dynamically from https://start.spring.io.

The things that you observed are correct. https://start.spring.io does not offer Spring 2.7.x versions of Spring anymore. Since Spring Boot 3.x requires JDK 17 as a minimum, there are no JDK versions prior to JDK 17 up there.

Please also note that Spring 2.x has reached the end of open-source support (see https://spring.io/projects/spring-boot#support).

0
suraj singh On

Solution for windows - Go pom.xml and change version from 3.x to 2.x like if you are using 3.1.9 change it to 2.7.17 and change java version in pom.xml to 8,save it and exit from STS. Then go to C drive users(depends on your system folder name) find .m2 folder and delete it, then again open STS. It will automatically download the data needed to run sprig version 2.7.17 .Now you can work on your project. Just check compatible dependency ,imports for your projects .