Documentation DigaSystem

Installing Java

Debian 10 and Elasticsearch 7.x

Just run

Bash
sudo apt install default-jdk

Check installed Java version with

Bash
java -version

Debian 8 and Elasticsearch 5.x

The desired version of OpenJDK is not available in out-of-the-box Debian Jessie. So you have to rely on Debian Backports repository and add the following lines to the end of your /etc/apt/sources.list file: 

Bash
# jessie backports
deb http://http.debian.net/debian jessie-backports main


You can use the nano text editor:

Bash
nano /etc/apt/sources.list


The installation of version 8 is then straight forward:

Bash
apt-get update
apt-get install -t jessie-backports openjdk-8-jdk


You can also make Java 8 the default:

Bash
update-alternatives --config java


Links with more detailed information: