Skip to content

Instantly share code, notes, and snippets.

@mmm
Created September 7, 2011 13:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mmm/1200599 to your computer and use it in GitHub Desktop.
Save mmm/1200599 to your computer and use it in GitHub Desktop.
sun java on ubuntu
#!/bin/bash
RELEASE_CODE=`lsb_release -a | awk '/Codename/ { print $2 }'`
add-apt-repository "deb http://archive.canonical.com/ ${RELEASE_CODE} partner"
apt-get update
apt-get -y install -qq --no-install-recommends debconf-utils
echo "sun-java6-plugin shared/accepted-sun-dlj-v1-1 boolean true" | debconf-set-selections
DEBIAN_FRONTEND=noninteractive apt-get -y install -qq sun-java6-jdk
update-java-alternatives --jre -s java-6-sun
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment