Preskočiť na hlavný obsah

How to manually add new jdk to gentoo


#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)

Obľúbené príspevky z tohto blogu

mysql 5.0 upgrade to 5.1

The 5.1 series of MySQLwas unmasked for the gentoo portage. When upgrading from an older major version (including 5.0), you will be required to rebuild everything linked to the libmysqlclient.so.15 and libmysqlclient_r.so.15. You can do this by installing app-portage/gentoolkit and running: # revdep-rebuild --library libmysqlclient.so.15 # revdep-rebuild --library libmysqlclient_r.so.15 If you use the Portage 2.2 series, you may also use: # emerge @preserved-rebuild The official upgrade documentation is available here: http://dev.mysql.com/doc/refman/5.1/en/upgrading.html Note that existing databases may need converting as well, again including those upgrading from 5.0 to 5.1.