In this tutorial you will learn How to install JDK 10 in Ubuntu 18.04?
Java/JDK 10: How to install JDK 10 in Ubuntu 18.04?
Java/JDK 10 is already here with many new features and updates. The most important changes is the support of var for declaration of location type variable. This feature is known as Local Variable Type inference and it is one of the most exciting feature of this release.
The Ubuntu 18.04 is latest release of Ubuntu operation system in 2018 and developers are using this operating system for development/deployment of enterprise applications. The apt tool is handy tool for installing software on Ubuntu operating system.
Java/JDK 10 release binary is available on the Ubuntu PPA update site and it can be installed with the help of this tool.
In this tutorial we are going to add the PPA repository details on the Ubuntu 18.04 operating system and then install JDK 10 on it. I have already installed one machine on the Oracle virtual VM and on this I will install Oracle Java 10.
Here are the steps of install JDK 10 on Ubuntu 18.04
Step 1: Install using the Personal Package Archives (PPA).
First off run the following command on terminal:
$ sudo add-apt-repository ppa:linuxuprising/java
Step 2: Update system
Then update your system with following command:
$ sudo apt-get update
Step 3: Install Oracle Java 10
Now start Java 10 installation process
$ sudo apt-get install oracle-java10-installer
Video Instruction of Installing JDK/Java 10 on Ubuntu 18.04:
Step 4: Set Java/JDK 10 as default
Set Java 10 as defaults with the following command:
$ sudo apt-get install oracle-java10-set-default
Now you should verify the installation:
java --version
javac --version
Output should look like:
deepak@deepak-VirtualBox:~$ java --version java 10.0.1 2018-04-17 Java(TM) SE Runtime Environment 18.3 (build 10.0.1+10) Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.1+10, mixed mode) deepak@deepak-VirtualBox:~$ javac --version javac 10.0.1 deepak@deepak-VirtualBox:~$
Above command will display the Java/JDK version as 10.x. So In this tutorial you learned to install JDK 10 on Ubuntu 18.04.
Here are more tutorials of Java: