Clone wiki

oracle-java7-jdk-nonfree / Home

Oracle JDK 7 Installation Script

This project contains a shell script to install the JDK7 compiled by Oracle. This script downloads the latest version, extract and configure the Debian alternatives system, allowing you to change between versions of Java installed on your operating system. The script also allows you to remove all installed files and settings made.

Install using the shell script

You can install the binaries of the Oracle JDK 7 using only the script. Just clone the project or download the script and run it as super user on your Debian/Ubuntu:

su -c "./update-oracle-jdk --install"

Install using the Debian package

Another option is to build the Debian package and install it using dpkg. First you need to install the build tools in Debian:

su -c "apt-get install build-essential cdbs devscripts dh-make"

Then just run the debuild command from within the project directory (the directory that contains the debian folder). The Debian package will be available a directory level above:

hg clone
cd oracle-java7-jdk-nonfree
su -c "dpkg -i ../oracle-java7-jdk-nonfree*.deb"

The package configures the system alternatives and also creates the ''.jinfo'' file for the command update-java-alternatives:

su -c "update-java-alternatives --set java-7-oracle"