Question

Can't install java jdk 11 on debian 9

Posted February 29, 2020 1.6k views
Java

Hello everyone, in short I tried for a past week to instal java 11 jdk on my debian 9 dedicated server and.. Well I can install java but any programs who use java shows that java not installed. I’m hosting game server and from last update it requires java 11. With java 8 everything working fine I tried tens of different variations how to install java jdk 11 but nothing works for me. No idea why.. Maybe someone have some ideas why?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

Hi @deimantasgaizauskas,

So, there can be a few reasons behind the experienced issues. Firstly, make sure you’ve covered the proper tutorial for installing Java on Debian. It’s full of unreliable sources. In this case DigitalOcean have a pretty good article on how to install Java https://www.digitalocean.com/community/tutorials/how-to-install-java-with-apt-on-debian-9 .

Having said that in the tutorial it’s not mentioned how to exactly install Java11 only up to Java10 so after you follow the initial configuration steps, to install Java11 you should be able to perform the following

  • Get the proper repo
echo 'deb http://ftp.debian.org/debian stretch-backports main' | sudo tee /etc/apt/sources.list.d/stretch-backports.list
  • Make an update
sudo apt update
  • Install Java11
sudo apt install openjdk-11-jdk

Now, if you still are experiencing issues, here comes the second bug I can think of. Since you mentioned you have Java8 installed and everything works fine with it, are you sure that when you install Java11 you are not still using the Java8 binaries? Java11 and Java8 do have different paths and as such the binaries located for them are also in different folders.

Regards,
KDSys

by Brian Hogan
Java and the JVM (Java's virtual machine) are required for many kinds of software, including Tomcat, Jetty, Glassfish, Cassandra and...
Submit an Answer