#list available JDKs
java-config-2 -L
#download and unpack tgz from oracle, eg oracle-jdk-1.7
/opt/oracle-jdk-1.7
#link-to /opt/oracle-jdk-1.7
/usr/lib/jvm/oracle-jdk-1.7
#create file /usr/share/java-config-2/vm/oracle-jdk-1.7
VERSION="Oracle JDK 1.7.0"
JAVA_HOME=/opt/oracle-jdk-1.7
JDK_HOME=${JAVA_HOME}
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/i386/:${JAVA_HOME}/jre/lib/i386/jli/:${JAVA_HOME}/jre/lib/i386/xawt/:${JAVA_HOME}/jre/lib/i386/server/"
MANPATH="${JAVA_HOME}/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-jdk-1.7"
BUILD_ONLY="FALSE"
PROVIDES="jdbc-stdext jdbc-rowset"
#correct file mod
chmod o+r /usr/share/java-config-2/vm/oracle-jdk-1.7
java-config-2 -S ? (set new JDK)
# /etc/java-config-2/current-system-vm (should be link-to /usr/lib/jvm/oracle-jdk-1.7)