How-to Install Oracle-Sun Java JDK 8 on Arch-Linux 32-64bit Easy Guide

January 6th, 2015 by thelinuxevangelist

Oracle JDK 8 QuickStart for Arch Linux



The Linux Tutorial Shows You Step-by-Step How-to Install and Getting-Started with the Latest Oracle-Sun Official Java JDK 8 on Arch-Linux 2012/2013/2014 i686/x8664 Desktop/Server.

After Installing you will need to Update your System Env Variables and PATH to make Arch-Linux Aware of the Java JDK8 Installation.



The Content and Details are Expressly Reduced to Give Focus Only to the Essentials Instructions and Commands and Make Tut Easier to Read & Digest ;)

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

    Install Oracle JDK 8 for Arch Linux - Open Terminal Window

  2. Download Oracle Java SE JDK 8 for Linux:

    Oracle JDK 8 tar.gz Linux
  3. Double-Click on the tar.gz Archive and Extract into /tmp
    Install Oracle JDK 8 for Arch Linux - tar.gz Extraction 1
    Or from Shell:

    tar xvzf ~/Downloads/jdk-8*.tar.gz -C /tmp/
  4. Relocate Oracle JDK8

    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.

    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. SetUp the Java JDK8 Environment Variables

    nano /etc/profile.d/oraclejdk8.sh

    export J2SDKDIR=/usr/lib/jvm/jdk1.8.0_UPDATE
    export J2REDIR=$J2SDKDIR/jre
    export JAVA_HOME=/usr/lib/jvm/jdk1.8.0_UPDATE

    Substitute the Right UPDATE on Quote.

    Ctrl+x to Save & Exit :)

    nano /etc/profile.d/oraclejdk8.csh

    setenv J2SDKDIR=/usr/lib/jvm/jdk1.8.0_UPDATE
    setenv J2REDIR=$J2SDKDIR/jre
    setenv JAVA_HOME=/usr/lib/jvm/jdk1.8.0_UPDATE

    Substitute the Right UPDATE on Quote.

  6. SetUp Java JDK8 Path

    Check if Another Jdk Releases is Already Installed:

    pacman -Q | grep jdk
    • If Yes then provide to Rename the Config Files in /etc/profile.d:

      mv /etc/profile.d/[javapackagename].sh /etc/profile.d/[javapackagename].sh.back
      mv /etc/profile.d/[javapackagename].csh /etc/profile.d/[javapackagename].csh.back

      LogOut and LogIn Again

      Then provide to Modify the Simlinks to Java Executables:

      ln -fs $JAVA_HOME/bin/java /usr/bin/java
      ln -fs $JAVA_HOME/bin/javac /usr/bin/javac
      ln -fs $JAVA_HOME/bin/jre /usr/bin/jre
      ln -fs $JAVA_HOME/bin/javaws /usr/bin/javaws
    • If Not then will be Enough to Edit the Bash Config file for the User:

      exit
      nano ~/.bashrc

      Inserts:

      export PATH="$JAVA_HOME/bin:$PATH"

      Load New Settings:

      source ~/.bashrc
Share on Tumblr

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


Comments are disabled