How to install JDK 10 in Ubuntu 18.04?

Ads
 
Tutorials   
What are the prerequisites for learning Java? How to replace all occurrences of a string in JavaScript? How to convert a stack trace to a string? Example code of reading file line by line in Java with Apache Commons IO library How to store unique values in Java using Set? java.nio ShortBuffer Example How to use Java Path class? Java NIO Package Tutorial How to limit object creation in Java? Java 11 String lines function example to split it in lines Top upcoming features of JDK 11 Java/JDK 11 Tutorial How to install JDK 10 in Ubuntu 18.04? Install JDK 10 on Windows Java 10 features Processing large file in Java Learning Java for non programmers Why You Should Learn Java in 2018? Installing JDK 9 on Windows 10 How to convert binary to decimal in Java? How to add two numbers in Java? What is Applet in Java with Example? What is nested class in Java with Example? Exception handling in Java Programming Examples What is Constructor Overloading in Java? How to display image in Swing? What is Java programming used for? How to create custom exception in Java? How to set CLASSPATH in Java? What is Multithreading in Java? IO Streams in Java with Examples How to convert String Date to Timestamp in Java? Best Java Tutorial for Beginners Read user input in Java using Scanner Java Programming Examples Read file line by line in Java 8 What are the benefits of learning Java Programming? A brief history and future of Java programming language Importance of Java for Mobile Application Development How To Become A Good Software Developer?

How to install JDK 10 in Ubuntu 18.04?

In this tutorial you will learn How to install JDK 10 in Ubuntu 18.04?

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:

[email protected]:~$ 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)
[email protected]:~$ javac --version
javac 10.0.1
[email protected]:~$ 

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:

Ads

Ads