sudo echo sun-java6-jre shared/accepted-sun-dlj-v1-1 select true | sudo /usr/bin/debconf-set-selections
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo apt-get update
sudo apt-get install --yes sun-java6-jdk sun-java6-jre
echo "JAVA_HOME=/usr/lib/jvm/java-6-sun" >> .bashrc
echo "PATH=\$PATH:\$JAVA_HOME/bin" >> .bashrc
java -version
In short, you accept the licence prior to installing, you add the update repository, you install java, you set the JAVA_HOME variable, update the PATH, and in the end check that it all ties in perfectly.
0 comments:
Post a Comment