java – How to set up upgraded JDK/JRE in Eclipse that came as bundle

I have JDK 17 installed on my machine. I imported a Maven project in Eclipse that requires Java 21.

Eclipse did not have jdk21 compliance in its compiler settings. I installed a new version of Eclipse` that does have a Java 21 compiler. But now project is complaining “Release 21 is not found in the system” in error logs. Suppose I don’t want to install a new JDK in my system. I want to use the one that came up with Eclipse as bundle.

I checked “Installed JREs”. It is still binds with jdk17.

Because, new Eclipse came with the bundled java 21, how to set up this bundle with Eclipse?

In windows, for “Installed JREs” the path is something like C:\Users…p2\pool\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86…

What is the equivalent in macOS?

Read more here: Source link