Question: How to Install Jdk on Ubuntu?
Contents

How to install Java (the default JDK) on Ubuntu using apt-get

  • Step 1: Update Ubuntu. The first thing you should always do is update your system. You can do so by running the following commands: apt-get update && apt-get upgrade.
  • Step 2: Install the default JDK. Run the following command: apt-get install default-jdk.

How do I install Java on Ubuntu?

Install Oracle Java 8 / 9 in Ubuntu 16.04, Linux Mint 18

  1. Add the PPA. Open terminal (Ctrl+Alt+T) and run the command:
  2. Update and install the installer script: Run commands to update system package index and install Java installer script:
  3. Check the Java version. To check the Java version after installing the package, run command:
  4. Set Java environment variables.

How do I download JDK on Linux?

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

  • Download the file, jdk-11.interim.update.patch_linux-x64_bin.tar.gz .
  • Change the directory to the location where you want to install the JDK, then move the .tar.gz archive binary to the current directory.
  • Unpack the tarball and install the JDK:
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