$ sudo apt-get install python-software-properties
$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get -y install oracle-java6-installer
$ sudo apt-get -y install oracle-java7-installer
$ sudo apt-get -y install oracle-java8-installer
$ sudo apt-get install openjdk-9
$ sudo apt-get install openjdk-9-jdk-headless
$ sudo dpkg --configure -a
$ sudo dpkg -i --force-overwrite '/var/cache/apt/archives/openjdk-9-jdk_9~b181-0ubuntu1_amd64.deb'
$ java -version
openjdk version "9-internal"
OpenJDK Runtime Environment (build 9-internal+0-2016-04-14-195246.buildd.src)
OpenJDK 64-Bit Server VM (build 9-internal+0-2016-04-14-195246.buildd.src, mixed mode)