You are here
Home > eclipse >

How to add JDK 17 support in Eclipse 2021-09 ?

Eclipse not recognising Java-17, How to add JDK 17 support in Eclipse 2021-09 ?, jdk17 IDE , jdk17 eclipse, eclipse jdk17, eclipse java 17, java 17 eclipse, eclipse java 17 support, eclipse for java 17, JDK 17 support in Eclipse 2021-09 – java

Eclipse_JDK17Oracle has released JDK 17 in September, 2021 and it’s general availability date is 2021/09/14. Java Development Kit (JDK) 17 will be a long-term-support (LTS) release, with extended support from Oracle expected for several years. Every Java Professional should be curious to know what is new in Java 17. But, how will we test the new features of Java 17 practically in the early days? However, we have a good news for Eclipse users. In this article, we will learn ‘How to add JDK 17 support in Eclipse 2021-09?’ Thanks to Eclipse community as they provide solution for developers before every new release of JDK version.

In this article, we will learn two ways of configuring JDK 17 in our eclipse. Each way will have step by step instructions to do it easily. Let’s start our topic ‘How to add JDK 17 support in Eclipse 2021-09 ?’.

Pre-requisite

Before knowing ‘How to add JDK 17 support in Eclipse 2021-09 ?’, we need to be sure that the following software are installed in our system.

♦ JDK 17 (you can download it from here)
♦ Eclipse 2021-09 : Eclipse IDE for Enterprise Java and Web Developers (You can download it from here as per your operating system)

Where can we download Java JDK latest version from?

There is an official website to download latest version of JDK. Even we can get the early access of future versions as well from there. Since we are discussing about JDK 17 in this article, we need to download JDK 17 here. The direct link to download JDK 17 is https://jdk.java.net/17/.

How to install Java/JDK 17 ?

In order to install JDK 17, you need to download the zip file by clicking the link according to your operating system. However, you can visit the oracle site and search for the latest build of JDK 17 to get it installed. Then, you need to unzip the zip file and paste the ‘jdk-17’ folder in the directory where other jdk versions exist. However, in my case, it is ‘C:\Program Files\Java’ which is the native place of jdk installation.

How to install Eclipse ?

Eclipse community has already suggested that we need to have a specific version of Eclipse installed in our system in order to get the support of JDK 17. The specific version is Eclipse 2021-09. You can directly click on the link to get it. Once you click on the link you will be on the Eclipse download page, then you have to click on the download link appearing on the page.

Steps to add JDK 17 support in Eclipse (eclipse jdk 17|eclipse java 17)

In order to add JDK 17 support in your eclipse, follow the below steps carefully. However, we are providing two ways to get it done. We also have included step by step images to have a clear understanding of the process.

Method-1: Using Eclipse Marketplace

However, Eclipse 2021-09 comes with Eclipse Marketplace. If you don’t find Marketplace in any particular version, then you can refer our article ‘How to install marketplace in Eclipse‘. Let’s follow below steps for the first method ‘Using Eclipse Marketplace’.

1) Make sure you already installed JDK 17 and Eclipse 2021-09 on your system. If not, kindly visit above section.
2) Open your eclipse, click on Help-> Eclipse Marketplace
3) In the search bar type ‘Java 17’ and hit enter.
4) You will find one item ‘Java 17 Support for Eclipse 2021-09 (4.21)
5) Now click on ‘Install’ button
6) Next, you will see the next window with heading ‘Confirm Selected Features’. You have to click on ‘Confirm’ button here. Let the checkboxes be selected as it is.
7) Now, a popup window with the message ‘Restart Eclipse IDE to apply the software update’ will appear. Here, you have to click on ‘Restart now’ button.

8) Then, you need to create one Test Project to check the JDK 17 support.
9) Now, click on Project -> Properties. Then select ‘Project Facets’ from the left.
10) Click on ‘Java’ checkbox and then select ’17’ from the dropdown and then click on ‘Apply and Close’ button.

 

How to add JDK 17 support in Eclipse 2021-09 ?

 

How to add JDK 17 support in Eclipse 2021-09 ?

 

eclipse_support_for_jdk16

 

How to add JDK 17 support in Eclipse 2021-09 ?

 

 

Method-2: Using Install New Software

Let’s follow below steps for the second method ‘Using Install New Software’.

1) Make sure you already installed JDK 17 and Eclipse 2021-09 on your system. If not, kindly visit a section given above for the guidelines in this article.
2) Open your eclipse, click on Help-> Install New Software
3) In the first field(Work with) paste the below URL and hit Enter.
https://download.eclipse.org/eclipse/updates/4.21-P-builds/
4) Multiple values with checkboxes will appear. You have to select ‘Eclipse Java 17 support for 2021-09 development stream’ and then click on ‘Next’ button and follow the instructions on the screen.
5) At the end, restart the eclipse.
6) Then you need to create one Test Project to check the JDK 17 support.
7) Now click on Project -> Properties. Then select ‘Project Facets’ from the left.
8) Click on ‘Java’ checkbox and then select ’17’ from the drop-down and then click on ‘Apply and Close’ button.

 

Eclipse_JDK17

Eclipse_JDK17

How to Verify that Eclipse has Java 17 Support

1) Click on Project -> Properties. Then select ‘Java Compiler’ from the left.
2) Uncheck the second checkbox (Use Compliance from execution environment)
3) Now click on the drop down there on the right side. You will see an additional entry for JDK 17 which is ’17 (BETA)’
4) Select ’17 (BETA)’ and click on ‘Apply and close’.

♥ Finally, you are ready to develop a project in Eclipse using Java 17.

 

Eclipse_JDK17

How to test JDK 17 features in Eclipse?

1) Create a new Java Test Project in Eclipse.
2) Right click on the project and navigate to Build Path -> Configure Build Path
3) Then, click on libraries
4) Now, add libraries from the right
5) Set the installation path for JDK 17
6) Finally, enjoy the testing of JDK 17 features.

That’s all about configuring & testing eclipse java 17| eclipse jdk 17 | eclipse java 17 support environment in your system.

Eclipse not recognising Java-17

If your eclipse is unable to recognize the Java 17 version, you need to follow above steps of this article.

♥  Here is the link to get to know ‘How to enable JDK 16 support in Eclipse?

♥ And here is the link to get to know ‘How to enable JDK 15 support in Eclipse?

 

close

Leave a Reply

Top