sign in
Home | Updates | Pages | Users | Admin | Help

debjava

Java6 on Debian

– Download the self-extracting .bin from Sun’s Java site .

– Set the downloaded .bin file as executable and execute it to unzip it:
# chmod +x jdk-6-linux-i586.bin
# ./jdk-6-linux-i586.bin
# mv ./jdk1.6.0 /opt/
– Update Debian’s alternatives so that debian knows to use your java executable:
# update-alternatives --install java java /opt/jdk1.6.0/bin/java 99
– Set some shell variables in /etc/bash.bashrc or your ~/.bashrc so that Java based programs know where to find the JDK:
export JDK_HOME=/opt/jdk1.6.0
export CLASSPATH=$JDK_HOME
export CLASSPATH=.:$CLASSPATH
export PATH="$PATH:${JDK_HOME}/bin:${JDK_HOME}/jre/bin" 
– Exit out of the Bash shell then open a new shell again. Check if everything is working:
# java -version
java version "1.6.0" 
Java(TM) SE Runtime Environment (build 1.6.0-b105)
Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing)

Powered by JunebugWiki v0.0.31 Page last edited by stoyan on December 18, 2006 05:16 PM (diff)
[readonly] Version 2 (current) «olderversions