Created
January 30, 2014 21:51
-
-
Save mugli/8720670 to your computer and use it in GitHub Desktop.
Silently install Oracle Java 7 on Ubuntu (without license agreement step)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for this!