How to Install Oracle JDK 8 on Manjaro Easy Guide

August 14, 2018 | By the+gnu+linux+evangelist.

Installing

  1. 4. Installing

    Next to Install Oracle JDK 8
    First, Login as SuperUser to make commands shorter:

    su 

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

    First, Make a jvm Directory if Not already there with:

    if [ ! -d "/usr/lib/jvm" ]; then mkdir /usr/lib/jvm; fi

    And Set the SuperUser as owner:

    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 contents with:

    mv /tmp/jdk1.8* /usr/lib/jvm/
  2. 5. Symlinking

    Follow to Setup Needed Symlinks
    First, to Copy the Exact Path to Insert in:

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

    Select & Ctrl+Shift+c to Copy the Path :)
    Go to the Parent directory with:

    cd ..

    Now Release the potentially existing Symlinks:

    unlink default
    unlink default-runtime

    Finally, for the JDK make:

    ln -s [copiedJdkPath] default

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

    ln -s [copiedJdkPath]/jre default-runtime

    With this you Should be Done! ;)

  3. 6. Setting Env Vars

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

    nano /etc/profile.d/oraclejdk8.sh

    And Paste in:

    /nexport J2SDKDIR=[copiedJdkPath]/nexport J2REDIR=$J2SDKDIR/jre/nexport JAVA_HOME=$J2SDKDIR/
    

    Ctrl+x to Save & Exit from nano :)

    nano /etc/profile.d/oraclejdk8.csh

    Again:

    setenv J2SDKDIR=[copiedJdkPath]
    setenv J2REDIR=$J2SDKDIR/jre
    setenv JAVA_HOME=$J2SDKDIR/
    

QuickChic Theme • Powered by WordPress