How to Install Java in Ubuntu?
Contents

Follow the steps below to install Java OpenJDK 11 on your Ubuntu system:

  • First, update the apt package index with: sudo apt update.
  • Once the package index is updated install the default Java OpenJDK package with:
  • Verify the installation, by running the following command which will print the Java version:

How do I install Java JDK on Linux?

To install the 64-bit JDK on a Linux platform:

  1. Download the file, jdk-11.interim.update.patch_linux-x64_bin.tar.gz .
  2. Change the directory to the location where you want to install the JDK, then move the .tar.gz archive binary to the current directory.
  3. Unpack the tarball and install the JDK:

How do I check if Java is installed on Ubuntu?

How to find Java version on Ubuntu 16.04 LTS (Linux)

  • Open a Linux Terminal (command prompt).
  • Enter the command java -version. If Java is installed on your Ubuntu 16.04 LTS system, you will see a Java version installed in response. The second way of finding Java version is using which command. Open the terminal and give the following which command.
Sophia Al-Mansoor

Sophia Al-Mansoor

Global Business & E-Commerce Reporter

Sophia analyzes international trade, startup ecosystems, retail transformation, and supply chain logistics for modern digital publications.

Share this article
Twitter Facebook Pinterest