sign in
Home | Updates | Pages | Users | Admin | Help
Comparing version 2 and version 1 back

h1. Java6 on Debian

- Download the self-extracting .bin from "Sun's Java site":http://java.sun.com/javase/6/ .

- 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