You are here
Home > eclipse >

How to add JDK 16 support in Eclipse 2021-03 ?

eclipse_support_for_jdk16Oracle has released JDK 16 in March, 2021 and it’s general availability date is 2021/03/16. Every Java Professional should be curious to know what is new in Java 16. But, how will we test the new features of Java 16 practically? However, we have a good news for Eclipse users. In this article, we will learn ‘How to add JDK 16 support in Eclipse 2021-03 ?’ 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 16 in our eclipse. Each way will have step by step instructions to do it easily. Let’s start our topic ‘How to add JDK 16 support in Eclipse 2021-03 ?’.

Pre-requisite

♦ JDK 16 (you can download it from here)
♦ Eclipse 2021-03 for Enterprise Developers (You can download it from here)

How to install Java/JDK 16 ?

In order to install JDK 16, 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 16 to get it installed. Then, you need to unzip the zip file and paste the ‘jdk-16’ 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 16. The specific version is Eclipse 2021-03. 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 16 support in Eclipse (eclipse jdk 16|eclipse java 16)

In order to add JDK 16 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-03 comes with Eclipse Marketplace. If you don’t find it in any future versions, 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 16 and Eclipse 2021-03 on your system. If not, kindly visit above section.
2) Open your eclipse, click on Help-> Eclipse Marketplace
3) In the search bar type “JDK 16” or “Java 16” and hit enter.
4) You will find one item ‘Java 16 Support for Eclipse 2021-03(4.19)
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 16 support.
9) Now, click on Project -> Properties. Then select ‘Project Facets’ from the left.
10) Click on ‘Java’ checkbox and then select ’16’ from the dropdown and then click on ‘Apply and Close’ button.

 

How to add JDK 16 support in Eclipse 2021-03

 

How to add JDK 16 support in Eclipse 2021-03

 

eclipse_support_for_jdk16

 

eclipse_support_for_jdk16

 

 

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 16 and Eclipse 2021-03 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.19-P-builds
4) Multiple values with checkboxes will appear. You have to select ‘Eclipse Java 16 support for 2021-03 development stream’ and then click on ‘Next’ button.
5) At the end, restart the eclipse.
6) Then you need to create one Test Project to check the JDK 16 support.
7) Now click on Project -> Properties. Then select ‘Project Facets’ from the left.
8) Click on ‘Java’ checkbox and then select ’16’ from the drop-down and then click on ‘Apply and Close’ button.

 

How to add JDK 16 support in Eclipse 2021-03

How to Verify that Eclipse has Java 16 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 16 which is ’16(BETA)’
4) Select ’16(BETA)’ and click on ‘Apply and close’.

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

 

eclipse JDK 16 support

How to test JDK 16 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 16
6) Finally, enjoy the testing of JDK 16 features.

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

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

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

One thought on “How to add JDK 16 support in Eclipse 2021-03 ?

Leave a Reply


Top