0

The OpenJDK website reports installation is a simple one line operation. Debian/Ubunutu is specifically referenced in the instructions. http://openjdk.java.net/install/

sudo apt-get install openjdk-8-jre

However, on Debian8 x64, I receive this error:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package openjdk-9-jre

Debian Package Search reports this is not available: https://packages.debian.org/search?searchon=names&keywords=openjdk-8-jre

That link only offers headless, Zero/Shark, JamVM versions which I don't think I need for basic java development.

Also searched for solutions including: https://askubuntu.com/questions/504276/how-do-i-use-apt-to-install-32-bit-openjdk-7-jre-on-azure-amd64-ubuntu-server-14

2

Well it turns out that openjdk-8-jre is in the testing debian release and not yet stable. Good job openJDK website :)

add a deb line to /etc/apt/sources.list

deb http://ftp.debian.org/debian testing main

now apt-get install works

sudo apt-get install openjdk-8-jre
| improve this answer | |
  • java -version still reports 1.7.0_79 :( – StackAbstraction Aug 30 '15 at 16:18
  • 1
    You probably need to use update-alternatives to change to change the default version. – languitar Sep 1 '15 at 15:49
  • BE CAREFUL! When adding testing repos many of the core libraries on your system will be updated which is probably not what you want. – Eugene van der Merwe Mar 14 '17 at 11:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.