The JDK is a development environment for building applications using the Java programming language. The JDK includes tools useful for developing and testing programs. Here we will install the Java14 in Linux.
Installing in Ubuntu:
Here we are going to PPA repositories to install javajdk-14 on ubuntu/LinuxMint Operating Systems. PPA are managed by the developer of the software itself to the latest version of the software. Let us start the installation for javajdk-14.
Update the apt manager.
# sudo apt update
# sudo apt upgrade
Adding PPA repository for the java binary packages.PPA stands for Personal Package Archive, this repository has software which is not updated by the ubuntu or other Linux OS package manager. These packages are directly from the developer to the users.
# sudo add-apt-repository ppa:linuxuprising/java
Installing and set java14 as the default:
# sudo apt update # sudo apt install oracle-java14-jdk oracle-java14-set-default
Installing in Mint:
To install the Debian version of the javajdk-14 you can directly download the Debian package from the oracle website and install it using the apt software management tool. First update and upgrade your apt tool, then download the package and install it using apt after that you need to set environment paths to use java anywhere on the system.
# sudo apt update
sudo apt upgrade
Download the Debian package using wget if wget is not installed using “apt install wget” then
# wget --no-check-certificate -c --header "Cookie: oraclelicense=accept-securebackup-cookie" "https://download.oracle.com/otn-pub/java/jdk/14+36/076bab302c7b4508975440c56f6cc26a/jdk-14_linux-x64_bin.deb"
A file named jdk-14_linux-x64_bin.deb will get downloaded, and now you need to install the downloaded .deb package.
# sudo apt install ./jdk-14_linux-x64_bin.deb
Set java environment paths to use java anywhere on the system.
# cat <<EOF | sudo tee /etc/profile.d/jdk14.sh export JAVA_HOME=/usr/lib/jvm/jdk-14 export PATH=\$PATH:\$JAVA_HOME/bin EOF
Now check if it is successfully installed on your system
# java --version
Attention reader! Don’t stop learning now. Get hold of all the important Java Foundation and Collections concepts with the Fundamentals of Java and Java Collections Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course.