How to install open-jdk 7?

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

quinao

Posted 2019-04-11T13:27:20.053

Reputation: 13

Answers

1

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

Geo Systems

Posted 2019-04-11T13:27:20.053

Reputation: 76

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:

valiano

Posted 2019-04-11T13:27:20.053

Reputation: 258

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 – 2019-04-15T09:27:38.030

@quinao got it, no worries – valiano – 2019-04-15T10:26:47.833