Install Java Ubuntu 18.04 Lts

  • Add-apt-repository ppa:linuxuprising/java. You might even want to run a quick update while you’re at it: apt-get update. Finally, you can install Java on your Ubuntu system by executing the following command and following the on-screen instructions: apt update; apt-get install oracle-java14-installer.
  • I will show you through the step by step installation JRE (Java Runtime Environment) and JDK (Java Development Kit) on Ubuntu 18.04 Bionic Beaver. Install Oracle Java on Ubuntu 18.04 LTS Bionic Beaver. First make sure that all your system packages are up-to-date. Sudo apt-get update sudo apt-get upgrade Step 2.

CD images for Ubuntu 18.04.5 LTS (Bionic Beaver) Parent Directory - MD5SUMS-metalink: 2020-02-12 13:42: 296: MD5SUMS-metalink.gpg.

When Ubuntu 18.04 LTS was released, I decided to install it on my lab computer running VMware Workstation Pro for testing purposes… the steps below is how I got OpenJdk installed…

If you’re going to be developing any Java programs you probably need Java JRE runtime software installed… There’s the original proprietary Java JRE and JDK from Oracle and an open source version called OpenJRE/JDK…

The open source Java is as good as the proprietary version from Oracle and easier to install and manage on Ubuntu..

This brief tutorial is going to show students and new users how to easily install the open source version of Java JRE on Ubuntu 18.04 LTS. In the past, one could easily install Oracle Java by simply enabling Ubuntu Partner’s repository and using apt-get command. Not anymore.

Now there’s an open source alternative to Oracle JAVA that can easily be installed via simple apt-get command and is as much compatible to probably all Java based applications.

This post is not about installing Oracle Java, but its alternative called Open Java JDK/JRE. Oracle Java isn’t the default anymore, now Open Java JDK/JRE is.

To install OpenJava on Ubuntu, continue with the steps below:

Step 1: Update Ubuntu

First run the update commands to update Ubuntu. To do that, run the commands below:

sudo apt-get update

After running the commands above, Ubuntu should prompt you to update any package that needs to be updated.

Step 2: Check if Java is Installed

After running Ubuntu update commands, run the commands below to check if any Java is installed on the system. To check if Java is installed on your systems, run the commands below.

java --version

If Java is not installed on the systems, you should see the lines below notifying you that Java is not installed, but then suggesting Java packages and how to install them. Now all you have to do is select the package from the list you want and run the apt-get command.

For this post, we want to install Java JDK/JRE so the obvious choice is default-jre

Step 3: Installing Java JDK/JRE

Now that you know the package to install, run the commands below to install Java JDK/JRE on Ubuntu.

sudo apt-get install default-jre

Accept the list of required packages that will also be installed by typing y for Yes. Doing that will install Open Java JDK/JRE on Ubuntu.

Lts

Now when you run the command to check whether Java is installed, you should get the results below.

And this is how to install Open Java JDK/JRE on Ubuntu.

Summary:

This post shows students and new users an easy way to Open Java JDK/JRE on Ubuntu systems. It’s an alternative to Oracle Java and the default for Linux and Ubuntu systems. If you’re going to be installing applications that require Java, then follow the steps above to install it.

Enjoy!

You may also like the post below:

Last Updated on

Tutorial To install JAVA On Ubuntu 20.04 LTS

We will install JAVA, JRE, and JDK in this tutorial post. We hope you know the differences between JRE and JDK.

JDK: Java Development Kit or JDK is a development environment that is used for developing Java Applications.

JRE: JAVA Runtime Environment or JRE is for running Java applications. It is a part of JDK.

Install Java on Ubuntu 20.04 LTS

Install OpenJDK or Oracle Java as per your requirement.

Install Java Ubuntu 18.04 Lts

Install OpenJDK In Ubuntu 20.04 LTS

First, update the repository index.

Install OpenJDK JDK In Ubuntu 20.04 LTS

JDK ( Default JDK 11)

Java JDK 11

Java JDK 8

JDK Headless

Default JDK ie JDK 11

Java JDK 11

Java JDK 8

Install OpenJDK JRE

JRE

Default JRE ie JRE 11

Java JRE 11

Java JRE 8

JRE Headless

Default JRE ie JRE 11

Java JRE 11 ###

Java JRE 8

Install Oracle Java In Ubuntu 20.04 LTS

There is no separate Java Runtime Environment as Oracle JDK v9.x and above now includes JRE as well.

Download Oracle Java JDK

You can use either the command line or browser to download the JDK in Ubuntu 20.04 LTS.

Go to the Oracle JDK and download the .deb package for the easy installation.

In an alternative method, you can download and install Oracle JAVA via command line:

Download Ubuntu 18.04 Lts Desktop

Install Oracle Java JDK In Ubuntu 20.04 LTS using the apt command.

By default, If you install Oracle JDK via .deb package then it will be installed in /usr/lib/jvm directory

Create a symbolic link for Java with Oracle JDK.

Run the update-alternatives command to set the default java version. You will see multiple options if you have different versions installed in your system:

Run the following command to verify your JAVA version.

Setup Environmental Variables In Ubuntu 20.04 LTS

You can create a file in /etc/profile.d directory to place the variables for your users.

Install Java Ubuntu 18.04 Lts

Now, change the variables path based on the Java location in your Ubuntu 20.04 LTS.

Install Java Ubuntu 18.04 Lts Free

Load the environments with the following command:

If you want to set the environment variables for a particular user, you need to place the above variables in the following file.

Ubuntu Linux 18.04 Lts

~/.bash_profile file.

Java Jdk Install Ubuntu 18.04

Related

Comments are closed.