1

I need to install open-jdk 7.

I know it used to be possible to simply type sudo apt install openjdk-7-jdk, but this doesn't work any more.

I know that Java 7 has become quite obsolete, but it is still being maintained - a security update was released a few days ago, so I hope it's still possible to install it.

I'm using Debian 9.

Anyone knows how to do it?

Thanks

1

Try using SDKMan, which allows to install and manage multiple java versions.

| improve this answer | |
0

While openjdk-7-jdk is absent in Debian 9 (Stretch), you should be able to install the latest stable OpenJDK 7 package from Jessie: https://packages.debian.org/jessie/openjdk-7-jdk

Using the following procedure:
How do I install a single package from Debian testing or unstable on stable?

Or, simply download and install the .deb packages directly from Debian security updates pool:

| improve this answer | |
  • apt was able to find the packages openjdk-7-jdk and openjdk-7-jre using this method, but then complained about missing dependencies. Which in turn needed dependencies to work. Fun fact, it seems that some of these dependencies must be installed from the stretch repo, not the jessie repo. The other answer is much simpler, that 's why I accepted it. – quinao Apr 15 '19 at 9:27
  • @quinao got it, no worries – valiano Apr 15 '19 at 10:26

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.