Last active
January 3, 2016 08:19
-
-
Save igniteflow/8434859 to your computer and use it in GitHub Desktop.
Install Oracle Java 7 on Ubuntu in a script i.e. no confirmation
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 | |
# Install Oracle Java 7 on Ubuntu in a script i.e. no confirmation | |
sudo add-apt-repository ppa:webupd8team/java -y | |
sudo echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-selections | |
sudo echo debconf shared/accepted-oracle-license-v1-1 seen true | debconf-set-selections | |
sudo apt-get install oracle-java7-installer | |
sudo update-java-alternatives -s java-7-oracle | |
java -version |
Also, you need the "-y" option on the "apt-get install".
sudo echo |
does not work, you must do echo | sudo
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think you need to run "apt-get update" once you have added a repository.