How To Download Java On Linux Command Line or How To Install Java’s latest version JDK 17 In Linux Terminal, This type of question you definitely in your mind if you Linux your like me. Hi buddy Amol and in this article, we are going to download or install openjdk-17-jdk in our Linux terminal.
Please note: If you want only the download command then please direct jump to steps 3 and step 4.
Step 1 Search jdk 17 In Terminal
sudo apt-cache search openjdk-17-jdk
Out-put
default-jdk - Standard Java or Java compatible Development Kit
default-jdk-headless - Standard Java or Java compatible Development Kit (headless)
openjdk-17-jdk - OpenJDK Development Kit (JDK)
openjdk-17-jdk-headless - OpenJDK Development Kit (JDK) (headless)
Step 2 identifies the correct JDK
sudo apt-cache show openjdk-17-jdk
Out-put
Package: openjdk-17-jdk
Source: openjdk-17
Version: 17.0.5+8-2
Installed-Size: 4582
Maintainer: OpenJDK Team <[email protected]>
Architecture: amd64
Provides: java-compiler, java-sdk, java10-sdk, java11-sdk, java12-sdk, java13-sdk, java14-sdk, java15-sdk, java16-sdk, java17-sdk, java2-sdk, java5-sdk, java6-sdk, java7-sdk, java8-sdk, java9-sdk
Depends: openjdk-17-jre (= 17.0.5+8-2), openjdk-17-jdk-headless (= 17.0.5+8-2), libc6 (>= 2.34)
Recommends: libxt-dev
Suggests: openjdk-17-demo, openjdk-17-source, visualvm
Size: 4558924
SHA256: 4c3c40c91febcf1c07d264a0d7ff7e6eb2b8e492a865070ecad8869d950abe85
SHA1: 3c2cc4d83880a58fec866db6cfd936ba88bc6f2d
MD5sum: 58643405137ab266c551194d78f2b55f
Description: OpenJDK Development Kit (JDK)
OpenJDK is a development environment for building applications,
applets, and components using the Java programming language.
Description-md5: b9e7f4837238c34971e4a8b72ab7d045
Multi-Arch: same
Homepage: https://openjdk.java.net/
Section: java
Priority: optional
Filename: pool/main/o/openjdk-17/openjdk-17-jdk_17.0.5+8-2_amd64.deb
Step 3 Update your Linux packages
sudo apt-get update
This is important for the latest JDK Version.
Step 4 Install Java 17 JDK in Command Line
sudo apt-get install openjdk-17-jdk
Out-put
Suggested packages:
openjdk-17-demo openjdk-17-source visualvm fonts-ipafont-gothic fonts-ipafont-mincho fonts-wqy-microhei | fonts-wqy-zenhei fonts-indic
The following NEW packages will be installed:
openjdk-17-jdk openjdk-17-jdk-headless openjdk-17-jre openjdk-17-jre-headless
The following packages will be upgraded:
default-jdk default-jdk-headless default-jre default-jre-headless
4 upgraded, 4 newly installed, 0 to remove and 1255 not upgraded.
Need to get 278 MB of archives.
After this operation, 434 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Type y for download.
Know Java 17 JDK install run your first programme and check.
How to download Java JDK in Linux?
Step 1 Search jdk 17 In Terminal.
Step 2 identifies the correct JDK.
Step 3 Update your Linux packages.
This is important for the latest JDK Version.
Step 4 Install Java 17 JDK in Command-Line.
How to install Java from the terminal?
sudo apt-get update
sudo apt-get install openjdk-17-jdk
For more information please visit https://openjdk.java.net/

