Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spring boot eclipse jre/jdk warning

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.

like image 744
BlackHawk3 Avatar asked Dec 18 '18 08:12

BlackHawk3


2 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
like image 57
Arigion Avatar answered Nov 14 '22 21:11

Arigion


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)

like image 32
William River Avatar answered Nov 14 '22 21:11

William River