Skip to content

Instantly share code, notes, and snippets.

@mugli
Created January 30, 2014 21:51
Show Gist options
  • Star 12 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mugli/8720670 to your computer and use it in GitHub Desktop.
Save mugli/8720670 to your computer and use it in GitHub Desktop.
Silently install Oracle Java 7 on Ubuntu (without license agreement step)
#!/bin/bash
sudo apt-get install -y python-software-properties
sudo add-apt-repository -y ppa:webupd8team/java
sudo apt-get update
# Enable silent install
echo debconf shared/accepted-oracle-license-v1-1 select true | sudo debconf-set-selections
echo debconf shared/accepted-oracle-license-v1-1 seen true | sudo debconf-set-selections
sudo apt-get install -y oracle-java7-installer
# Not always necessary, but just in case...
sudo update-java-alternatives -s java-7-oracle
# Setting Java environment variables
sudo apt-get install -y oracle-java7-set-default
@mpouttuclarke
Copy link

Thanks for this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment