Skip to content

Instantly share code, notes, and snippets.

@marcoceppi
Forked from mmm/install
Created November 3, 2011 14:16
Show Gist options
  • Save marcoceppi/1336585 to your computer and use it in GitHub Desktop.
Save marcoceppi/1336585 to your computer and use it in GitHub Desktop.
sun java on ubuntu
#!/bin/bash
juju-log "Adding Canonical Partner repository"
RELEASE_CODE=`lsb_release -sc`
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