Skip to content

Instantly share code, notes, and snippets.

@cgrandsjo
Forked from igniteflow/oracle-java-ubuntu.sh
Last active August 29, 2015 13:57
Show Gist options
  • Save cgrandsjo/9544784 to your computer and use it in GitHub Desktop.
Save cgrandsjo/9544784 to your computer and use it in GitHub Desktop.
#!/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 -y
sudo update-java-alternatives -s java-7-oracle
java -version
@cgrandsjo
Copy link
Author

Just added the "-y" option to the "apt-get install oracle-java7-installer" command so that you don't need to confirm the installation.

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