0

I am trying to migrate my Springboot projects from Java 8 to Java 11 although I'm having issues first on updating the installed jre of my STS. Since java 11 doesn't have any separate jre, unlike the previous versions, I was trying to include the jdk 11. Although as you can see on the bottom photo, it does not seem to locate the jrt-fs.jar file.

enter image description here

I've also tried to configure the SpringToolSuite4.ini file by including these lines:

-vm C:\Program Files\Java\jdk-11.0.7\bin\javaw.exe

This is how my .ini file looks like:

enter image description here

Although nothing still happens. Anyone who has other pieces of advice on where I should check? Thank you in advance!

Rocky
  • 429
  • 1
  • 9
  • 26

2 Answers2

0

You are adding the lib/ dir instead of bin/.

Don't forget to add bin/ to the %Path% environment variable.

Make sure you don't have duplicates from earlier versions of the jdk/jre.

Sorry, you are adding the jdk instead of the jre that is expected:

https://www.java.com/de/download/help/download_options.xml

Kev
  • 21
  • 4
  • - The jrt-fs.jar is saved in the lib folder. - I've added the bin/ folder in my %Path%. - So should I uninstall the java 8 first before it can work? – Rocky Jun 10 '20 at 07:34
  • what does "java --version" output in cmd? – Kev Jun 10 '20 at 07:35
  • It outputs: java 11.0.7 2020-04-14 LTS Java(TM) SE Runtime Environment 18.9 (build 11.0.7+8-LTS) Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.7+8-LTS, mixed mode) – Rocky Jun 10 '20 at 07:36
  • Download the jre instead of the jdk: https://www.oracle.com/java/technologies/javase-jre8-downloads.html Use the same version as the jdk. – Kev Jun 10 '20 at 07:40
  • So I'm going to use jdk 11 but jre 8? – Rocky Jun 10 '20 at 07:41
  • But java 11 doesn't have a separate jre anymore. – Rocky Jun 10 '20 at 07:48
  • The jre has changed for java 11; https://stackoverflow.com/questions/53733312/where-is-jre-11 If the steps are too involved, consider using an earlier version of java. – Kev Jun 10 '20 at 07:51
0

In the preference for configuring the JREs you should select the JDK folder itself, not the lib nor the bin folder. Eclipse will find all the necessary files and libraries that are included in that JDK and can deal with JDKs >= 11.

Please note that this preference is different from the VM that you specify in your ini file. The VM in the ini file is used to run the IDE itself, not to compile your projects against or run them. It is a totally separate thing, which allows you to run your IDE on JDK11 (for example), whereas at the same time you can implement and run projects on JDK8 or JDK14 (or whatever).

Martin Lippert
  • 5,988
  • 1
  • 15
  • 18