Thursday, October 25, 2012

How-to Install Custom Oracle-Sun Java JDK 7 x64 on Linux Gentoo 2012 64bit Easy Visual-Guide

The Guide Show Step-by-Step How-to Install the Latest Oracle-Sun Official Java SE JDK 7 x64 on Linux Gentoo 2012 KDE4 x86_64 Desktop.

The Process is a Little Beat Tedious and Intricate but it Simply Give you the Freedom to Know How-to Choose Freely which JDK7 to Install.)

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

The Content and Details are Expressly Reduced to Give Focus Only to the Essentials Instructions and Commands and Make Tut more Easy & Digestive;)

Java On Sabayon
  1. Download Oracle-Sun Java SE JDK 7:

    JDK 7 x64.tar.gz
  2. Extract JDK 7 tar.gz Archive
    mv </path/To>/jdk*tar.gz /tmp
    tar xvzf </path/To>/jdk*tar.gz
  3. Open a Terminal Window

    How-to Easy&Quick Installing Gentoo 12 KDE4 from Live DVD:

    Gentoo 12 KDE4 Quick-Installation
  4. Relocate Java JDK7
    sudo su
    mv /tmp/jdk1.7.* /opt
  5. Making an Oracle JDK7 Installation Config File

    Just Substitute to the X the Correspondent Java Update Version.

    nano /usr/share/java-config-2/vm/oracle-sun-jdk7u<X>

    Now you can simply Just Copy, Paste and Substitute the Right Values in Sections Between "<>"

    VERSION="Oracle-Sun JDK 7u<X>"
    JAVA_HOME="/opt/<jdk1.7.0_0X>"
    JDK_HOME="/opt/<jdk1.7.0_0X>"
    JAVAC="${JAVA_HOME}/bin/javac"
    PATH="${JAVA_HOME}/bin:${JAVA_HOME}/jre/bin"
    ROOTPATH="${JAVA_HOME}/bin:${JAVA_HOME}/jre/bin"
    LDPATH="${JAVA_HOME}/jre/lib/amd64/:${JAVA_HOME}/jre/lib/amd64/native_threads/:${JAVA_HOME}/jre/lib/amd64/xawt/:${JAVA_HOME}/jre/lib/amd64/server/"
    MANPATH="/opt/icedtea-bin-7.2.2.1/man"
    PROVIDES_TYPE="JDK JRE"
    PROVIDES_VERSION="1.7"
    # Taken from sun.boot.class.path property
    BOOTCLASSPATH="${JAVA_HOME}/jre/lib/resources.jar:${JAVA_HOME}/jre/lib/rt.jar:${JAVA_HOME}/jre/lib/jsse.jar:${JAVA_HOME}/jre/lib/jce.jar:${JAVA_HOME}/jre/lib/charsets.jar"
    GENERATION="2"
    ENV_VARS="JAVA_HOME JDK_HOME JAVAC PATH ROOTPATH LDPATH MANPATH"
    VMHANDLE="oracle-jdk7"
    BUILD_ONLY="FALSE"
    

    Ctrl+x to Save and Exit

  6. Updating the System to Custom Oracle Sun JDK 7

    Make a Symlink

    ln -s /opt/jdk1.7.0_0X/ /usr/lib/jvm/oracle-sun-jdk7uX

    Find the New Oracle Java SE JDK 7 Installation

    java-config -L

    Switch System Java to the New Manually Installed Oracle JDK 7

    java-config --set-system-vm oracle-sun-jdk7uX

    Test New Oracle JDK 7 Installation

    java -version
  7. Getting-Started and Running with JDK 7:

    Quick Getting-Started Tutorial for JDK 7 Development