More specifically, “JDK” or “Java Development Kit” is a core component of Java that offers a software development environment for building Java applications. A private JVM or Java Virtual machine and some other resources are included in JDK, which plays their role in application development.
This write-up will discuss the method to install JDK 14 on Ubuntu 22.04. So, let’s start!
How to install JDK 14 on Ubuntu 22.04
For the installation of JDK 14 on Ubuntu 22.04, you must follow the below-given step-by-step instructions.
Step 1: Update system repositories
Press “CTRL+ALT+T” to open the terminal of the Ubuntu 22.04 and run the below-given command to update system repositories:
Step 2: Download JDK 14 archive file on Ubuntu 22.04
After updating the system packages, utilize the following “curl” command to download the JDK 14 archive file:
Step 3: Extract JDK 14 archive file
Now, extract the downloaded JDK 14 archive file by executing the below-given “tar” command:
Step 4: Configure Java Environment
It’s time to configure the Java environment on your Ubuntu 22.04. To do so, firstly, move the extracted JDK 14 folder to the “/opt” directory:
Then, execute the following “tee” command:
Type given statements to add the variable path for JDK 14 on your Ubuntu 22.04 system:
> export PATH=\$PATH:\$JAVA_HOME/bin
> EOF
Now, write out the “source” command to execute the profile file “jdk14.sh”:
Step 5: Verify JDK version
Lastly, verify the existence of JDK 14 on Ubuntu 22.04 by either checking the Java variable path:
Or by validating the version of the installed JDK on your system:
The below-given output signifies that we have successfully installed JDK 14 on our Ubuntu 22.04:
We have provided the simplest method to install JDK 14 on Ubuntu 22.04. Give it a try and step into the world of application development.
Conclusion
To install JDK 14 on Ubuntu 22.04, download the JDK14 archive file using the “$ curl -O https://download.java.net/java/GA/jdk14/076bab302c7b4508975440c56f6cc26a/36/GPL/openjdk-14_linux-x64_bin.tar.gz” command, then extract the downloaded JDK file. After that, configure the Java environment and add the variable path on your Ubuntu 22.04 system. This write-up covered the method to install JDK 14 on Ubuntu 22.04.