how to install jdk 17 on linux

Install Java Development Kit 17 (JDK), which provides the language and a compiler. The runtime environment (JRE) lets you execute Java. The JDK lets you compile Java sources into executable classes. There are two main distributions: Oracle JDK and OpenJDK.
We chose the second one under the GNU General Public License because the Oracle JDK license changed for releases starting in April 2019, permitting only certain uses at no cost. However, you can download the commercial builds of JDK from Oracle(https://www.oracle.com/java/technologies/downloads/#java17) under a non-open-source license at the Oracle Technology Network.

Here are the steps that need to be followed to install Java SE:

  1. Select the Java with your operating system. (Download the OpenJDK release for your platform from https://jdk.java.net/17/)
  2. Click on the link to the installer that fits your operating system and the format (extension) you are familiar with.
  3. If in doubt, click the Installation Instructions link below and read the installation instructions for your operating system.
  4. Follow the steps that correspond to your operating system.
  5. The JDK is installed successfully when the java -version command on your computer displays the correct Java version, as demonstrated in the following example

OpenJDK and Oracle JDK binaries are compatible and close to each other, but there are some differences.

  • Oracle JDK source code includes the following text: “ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.” The OpenJDK refers to the GPL license terms.
  • The output of Java the version in Oracle JDK includes the Oracle-specific identifier. OpenJDK does not include the Oracle-specific identifier.
  • Oracle JDK uses the Java Cryptography Extension (JCE) Code Signing Certificate. OpenJDK allows unsigned third-party crypto providers.
  • OpenJDK is offered only as a compressed archive. Oracle JDK offers installers.

Add the JDK path to the PATH environment variable
export PATH=/usr/local/jdk-17/ /bin
java -version

Visit our Website ProcareerGrowth for Genuine Content.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top