LinuxHow to install Oracle JDK 8 on Deepin (Updated Method)

How to install Oracle JDK 8 on Deepin (Updated Method)

This guide will introduce how to install Oracle JDK 8 (Java Development Kit) on your Deepin Linux. Oracle JDK 8 is still widely used for legacy Java applications. Since the traditional webupd8team PPA is no longer available, you’ll need to install it manually. Here’s the correct and updated way to install Oracle JDK 8 on Deepin Linux:

1. Update your System.

Before installing anything, make sure your system is up to date by running the command below on your terminal. (To open the Terminal, search for “Terminal” in the app menu.)

sudo apt-get update && sudo apt-get upgrade

2. Download Oracle JDK 8 from the Official Website

  1. Go to this website: https://www.oracle.com/java/technologies/javase/javase8-archive-downloads.html
  2. Sign in with an Oracle account. If you don’t have one, you can create it (it’s free).
  3. Download the jdk-8u202-linux-x64.tar.gz file in to the Downloads directory.

3. Extract and Install JDK

Now create a directory in the /opt directory and move the JDK there.

sudo mkdir -p /opt/java
cd ~/Downloads
sudo tar -zxvf jdk-8u202-linux-x64.tar.gz -C /opt/java

3. Set Oracle JDK 8 as Default

Configure your system to use Oracle JDK 8 as the main java version

sudo update-alternatives --install /usr/bin/java java /opt/java/jdk-8u202-linux-x64.tar.gz/bin/java 1
sudo update-alternatives --install /usr/bin/javac javac /opt/java/jdk-8u202-linux-x64.tar.gz/bin/javac 1

Then select the installed JDK as default:

sudo update-alternatives --config java
sudo update-alternatives --config javac

When asked, type the number next to the Oracle JDK 8 and hit Enter.

6. Verify the Installation

Run the following command to verify your JDK installation:

java -version

You should see output similar to:

java version "1.8.0_202"

If it shows something like above, you have installed Oracle JDK 8 successfully! 🎉

 

Recent Articles

Related Stories

Leave A Reply

Please enter your comment!
Please enter your name here