Oracle JDK 17 Deepin Installation – Step-by-step Guide

November 21, 2021 | By the+gnu+linux+evangelist | Filed in: Tutorial.

Installing

  1. 2. Downloading Oracle JDK 17

    Download Oracle JDK 17 GNU/Linux Package

    Oracle JDK 17 .deb 64-bit
  2. 3. Installing Oracle JDK 17

    Then to Setup Oracle JDK 17 on Deepin Linux
    First, Access the Target, usually in the Downloads folder:
    (But if downloaded with Firefox it can be instead into /tmp/mozilla*)

    cd && cd Downloads

    Now to Confirm the Package is there do:

    ls . | grep jdk

    But if you are in Trouble to Find it out on Terminal then See: How to Access Downloads Folder from Browser.

    Finally, to Install JDK 17 simply:

    sudo dpkg -i jdk-17*.deb
  3. 4. Setting Up Java

    Next to Set Up Oracle Java JDK 17
    You can directly Copy & Paste the Commands into Terminal..

    sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk-17*/bin/java65
    sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk-17*/bin/javac65
    sudo update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk-17*/bin/jar65
    sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk-17*/bin/javaws65

    Checking or Setting the System Java Version in Use with

    sudo update-alternatives --config java

    And for the Java Compiler instead:

    sudo update-alternatives --config javac

    To Switch of Java Version Just Enter the Selection Number on First, Column. :)

    How to Install Oracle JDK 17 on Deepin/Debian Based - JDK Configuration

  4. 5. Setting Up Env

    (Optional) Setting JAVA_HOME User Environment Variable
    And Edit the Bash environment Configuration file

    nano $HOME/.bashrc

    Append:

    export JAVA_HOME=/usr/lib/jvm/jdk-17[Release]

    Replace [Release] with the actual one on the above Command.
    Possibly to Check the JDK 17 exact PATH use in another window:

    ls /usr/lib/jvm/

    Ctr+x to Save & Exit from nano Editor :)
    Next to Load the New Bash Environment:

    bash
  5. Finally, Test New Java JDK 17 Installation

    java -version

Contents


Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

QuickChic Theme • Powered by WordPress