How did I install Java to Debian 9?

debian-9-stretch
debian
java
(Dmitry Fedyuk) #1

Step 1

aptitude install default-jre
aptitude install default-jdk

Step 2

update-alternatives --config java

You will got a path to your Java.
Add it to the /etc/environment file:

JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java"

Step 3

source /etc/environment

digitalocean.com/community/tutorials/how-to-install-java-with-apt-on-debian-9

0 Likes

How did I install Elasticsearch to Debian 9?