Spring boot eclipse jre/jdk warning

Viewed 5372

I recently installed Spring boot on Ubuntu. When I run spring I get the following warning:

The JRE you are running Eclipse with appears to not be a JDK.
Spring Boot Live hovers will not work with a plain JRE.
The JRE you are running Eclipse with is: /usr/lib/jvm/java-11/openjdk-amd64

How can I get rid of this warning? Eclipse clearly points to the right JDK.

4 Answers

Even though the JRE path contained the letters JDK, on my system (Ubuntu 18.10) the JDK was not installed. Try:

sudo apt-get install openjdk-11-jdk openjdk-11-demo openjdk-11-doc openjdk-11-jre-headless openjdk-11-source

Please check this https://www.matsim.org/docs/devguide/eclipse/jdk

If no JDK is used for Eclipse, change it:

Quit Eclipse if it is running
Go to the Eclipse installation directory and open the file eclipse.ini in a text editor.
Search for the line -vmargs
Before the line -vmargs, add two lines:

On the first line, write -vm

On the second line, write the path to your JDK installation (usually something like: C:\Program Files\Java\jdk1.6.0_31\bin\javaw.exe on Windows /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/MacOS/libjli.dylib on MacOS)

You can define the JRE/JDK on the Run/Debug Java Application config (if that is the way you are starting up your Spring Boot app):

Run/Debug -> Java Application -> JRE tab -> Alternate JRE

This would override any other default/IDE JRE settings.

The message is saying that Elipse is launched with a JRE instead of a JDK installation. Edit your elipse.ini to point the your JDK installation: For example, on iOS you should replace the line

/Users/user/.p2/pool/plugins/org.eclipse.justj.openjdk.hotspot.jre.full.macosx.x86_64_14.0.2.v20200815-0932/jre/lib/libjli.dylib

with

/Library/Java/JavaVirtualMachines/jdk-11.0.2.jdk/Contents/MacOS/libjli.dylib
Related