Christophe Casalegno

The Perfect Automatic Java Installer for Debian 8

Hi all, today I’ll give you a simple way to quickly install Oracle Java 8 on your Debian 8 server with just one command. In the future I’ll add parameters so in the future it will be possible to choose your java version and the default version you want to be active on the system.

Now stop to talk, just take a look on the script :

# PAJI : The Perfect Automatic Java Installer
# Version : 0.1
# Author : Christophe Casalegno aka Brain 0verride
# Website :
# Twitter :
# Note : Just for Oracle Java 8 for the moment, i'll add more after
# Note 2 : Only tested on Debian 8

source_1="deb xenial main"
source_2="deb-src xenial main"
packages="oracle-java8-installer oracle-java8-set-default"

echo "$source_1" | tee $source_list
echo "$source_2" | tee -a $source_list

apt-key adv --keyserver $keyserver --recv-keys $key
apt-get update
echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-selections
echo debconf shared/accepted-oracle-license-v1-1 seen true | debconf-set-selections
apt-get -y -f install $packages

exit 0

Note : when you’ll download PAJI, it will be probably different because i’ll add it some features. I’ll create a specific page for it like for PALI, my Perfect Automatic LAMP Installer

So for automatically install Oracle Java8 for Debian 8 just do it :

wget --no-check-certificate
chmod +x

That all, no need to ask question about license or other thing : PAJI do it for you. You can also download the script : PAJI

Last version & note will be available from here : PAJI

Enjoy !

Christophe Casalegno
You can follow me on : Twitter | Facebook | Linkedin | Telegram

Leave a Comment