How to Install Oracle JDK 8 Antergos Linux Easy Guide

August 14th, 2017 by thelinuxevangelist

Install Oracle JDK 8 Antergos





Hello Antergos Linux User! This Tutorial Shows You Step-by-Step How-to Install Oracle JDK 8 Antergos GNU/Linux Desktop.

Especially relevant: for Installing Oracle JDK 8 on Antergos you have to Manually Setup it.

Furthermore on the Article Bottom there is a Link for Quick Getting-Started with Java JDK 8 Development on Antergos.

Finally to Make the Entire Process Easier to Visualize and Retain the Post Includes the Basic Screenshots of the Essentials Steps Involved.

Install Oracle JDK 8 Antergos Linux - Featured
  1. Open a Command Line Terminal Window
    (Press “Enter” to Execute Commands)

    Install Oracle JDK 8 Antergos Linux - Gnome Launch Terminal
  2. Download Oracle Java SE JDK 8 Linux Release:

    Oracle JDK8 x64.tar.gz
  3. Then Double-Click on Antergosive and Extract Into /tmp

    Install Oracle JDK 8 Antergos Linux - Extraction

  4. Next Relocate Oracle JDK 8
    First Login as SuperUser to make commands shorter:

    su 

    If Got “User is Not in Sudoers file” then Look:
    Solution

    chmod +x /tmp/jdk1.8*/bin/*
    if [ ! -d "/usr/lib/jvm" ]; then mkdir /usr/lib/jvm; fi

    The above command is used to create a jvm directory if not already there.
    Set the SuperUser as holder:

    chown -R root:root /tmp/jdk1.8*

    Reiterate the Execution Permission over the Java binaries

    chmod -R +x /tmp/jdk1.8*/bin

    Finally Shift the Java content with

    mv /tmp/jdk1.8* /usr/lib/jvm/
  5. Follow to Setup Needed Symlinks
    First Copy the Exact Path to Insert in:

    cd /usr/lib/jvm/jdk1.8*
    pwd

    Select & Ctrl+Shift+c to Copy the Path :)

    cd ..

    Release the eventually existing Symlinks:

    unlink default
    unlink default-runtime

    For the JDK make:

    ln -s [copiedJdkPath] default

    Ctrl+Shift+v to Paste the Path.
    And for JRE:

    ln -s [copiedJdkPath]/jre default-runtime

    With this you Should be Done!

  6. Finally Test Oracle JDK 8 Java Install

    java -version

    On the Output simply must Not be present an Openjdk to Certify it…

  7. (Optional) SetUp the Java JDK 8 Environment Variables
    Use the PATH copied in Previous step…

    nano /etc/profile.d/oraclejdk8.sh
    export J2SDKDIR=[copiedJdkPath]
    export J2REDIR=$J2SDKDIR/jre
    export JAVA_HOME=$J2SDKDIR/
    

    Ctrl+x to Save & Exit from nano :)

    nano /etc/profile.d/oraclejdk8.csh
    setenv J2SDKDIR=[copiedJdkPath]
    setenv J2REDIR=$J2SDKDIR/jre
    setenv JAVA_HOME=$J2SDKDIR/
    
  8. Getting-Started with Oracle Java JDK 8 Development:

    Getting-Started Quickly with JDK 8
(Visited 19 times, 1 visits today)

Tags: ,


Comments are disabled