0

I'm new to Java and I'm using Eclipse for the first time. I installed JDK 20 manually, but Eclipse didn't find it.

I've tried: 1- Installing Java SE-20 from the marketplace. JRE 20 is still unbound. 2- Using the search function (C:\Program Files\Java\jdk-20\bin)

and it says

No JREs found in C:\Program Files\Java\jdk-20\bin

How would I solve this?

  • Similar: [*Why Eclipse 2018-12 says "No JREs found" in JDK-11?*](https://stackoverflow.com/q/54629793/642706) – Basil Bourque May 10 '23 at 23:43
  • 1
    Don't specify the bin folder, try pointing to the root folder (that contains the bin folder). – Maarten Bodewes May 10 '23 at 23:50
  • @MaartenBodewes When I pointed to "C:\Program Files\Java\jdk-20" it gave me the same error message – Juancito1201 May 11 '23 at 00:18
  • Which search function? Please be more specific to describe the steps you are following. – aled May 11 '23 at 01:08
  • @aled I click on Properties < Java Build Path < Libraries < Modulepath < Edit < Installed JREs < Search – Juancito1201 May 11 '23 at 01:34
  • Have you tried the solution suggested in the link that @BasilBourque shared? – aled May 11 '23 at 01:41
  • I haven't, I will try and notify if it worked or not. I mistook it for an automatic post as I'm pretty new to this website. – Juancito1201 May 11 '23 at 01:44
  • Yes, it worked. The solution was to use Properties < Java Build Path < Libraries < Modulepath < Edit < Installed JREs < Add and go to "C:\Program Files\Java\jdk-20", thank you. – Juancito1201 May 11 '23 at 01:52
  • Which version of Eclipse is it? One that was released when Java 20 was out? – nitind May 11 '23 at 03:43
  • 1
    Java 20 was released after the current Eclipse version 2023-03. So you need to install [Java 20 Support for Eclipse 2023-03 (4.27)](https://marketplace.eclipse.org/content/java-20-support-eclipse-2023-03-427) (in Eclipse via _Help > Eclipse Marketplace..._). Java 20 has no long time support (LTS), which means it will become obsolete with the Java 21 release in September. As Java beginner, better use the Java 17 that is shipped with Eclipse. – howlger May 11 '23 at 07:17

1 Answers1

0

howlger was right. You need to download the Java 20 Support for Eclipse 2023-03 through MarketPlace in Eclipse, install it and then restart Eclipse, once did that you only have to change the configuration once you are creating a new project.

  1. Go to Help -> Eclipse MarketPlace
  2. Search Java 20 Support for Eclipse 2023-03
  3. Install
  4. Let Eclipse Restart itself
  5. Use create project to change the JavaSE and Java JDK
  6. And you are ready to go
PROX
  • 11
  • 1