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

1 Answer 1

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
3
  • java -version still reports 1.7.0_79 :( Commented Aug 30, 2015 at 16:18
  • 1
    You probably need to use update-alternatives to change to change the default version.
    – languitar
    Commented Sep 1, 2015 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. Commented Mar 14, 2017 at 11:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .