Skip to content

Instantly share code, notes, and snippets.

@mmcgrana
Created July 23, 2010 14:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mmcgrana/487493 to your computer and use it in GitHub Desktop.
Save mmcgrana/487493 to your computer and use it in GitHub Desktop.
#!/bin/bash
set -e
set -x
add-apt-repository "deb http://archive.canonical.com/ lucid partner"
cat << EOD | debconf-set-selections
sun-java5-jdk shared/accepted-sun-dlj-v1-1 select true
sun-java5-jre shared/accepted-sun-dlj-v1-1 select true
sun-java6-jdk shared/accepted-sun-dlj-v1-1 select true
sun-java6-jre shared/accepted-sun-dlj-v1-1 select true
EOD
dpkg --set-selections << EOS
sun-java6-jdk install
EOS
apt-get update
apt-get install sun-java6-jre -y
update-java-alternatives -s java-6-sun --jre
java -version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment