How to Install Oracle JDK 8 on Manjaro Easy Guide

August 14, 2018 | By the+gnu+linux+evangelist | Filed in: Tutorial.


  1. 4. Installing

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


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

    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*

    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/

    And Paste in:

    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/

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

QuickChic Theme • Powered by WordPress