Skip to main content
Skip table of contents

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:

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.