You may find OpenJDK 6 and 7 binaries for Windows in openjdk-unofficial-builds github project.
Update: OpenJDK 8 and 11 LTS binaries for Windows x86_64 can be found in ojdkbuild github project.
Disclaimer: I've built them myself.
Update (2019): OpenJDK Updates Project Builds for 8 and 11 are available now.
Answer from alexkasko on Stack OverflowYou may find OpenJDK 6 and 7 binaries for Windows in openjdk-unofficial-builds github project.
Update: OpenJDK 8 and 11 LTS binaries for Windows x86_64 can be found in ojdkbuild github project.
Disclaimer: I've built them myself.
Update (2019): OpenJDK Updates Project Builds for 8 and 11 are available now.
In case you are still looking for a Windows build of OpenJDK, Azul Systems launched the Zulu product line last fall. The Zulu distribution of OpenJDK is built and tested on Windows and Linux. We posted the OpenJDK 8 version this week, though OpenJDK 7 and 6 are both available too. The following URL leads to you free downloads, the Zulu community forum, and other details: http://www.azulsystems.com/products/zulu These are binary downloads, so you do not need to build OpenJDK from scratch to use them.
I can attest that building OpenJDK 6 for Windows was not a trivial exercise. Of the six different platforms we've built (OpenJDK6, OpenJDK7, and OpenJDK8, each for Windows and Linux) for x64 so far, the Windows OpenJDK6 build took by far the most effort to wring out items that didn't work on Windows, or would not pass the Technical Compatibility Kit test protocol for Java SE 6 "as is."
Disclaimer: I am the Product Manager for Zulu. You can review my Zulu release notices here: https://support.azulsystems.com/hc/communities/public/topics/200063190-Zulu-Releases I hope this helps.
Security Warning
Packages in the PPA mentioned below are not updated with security patches to Java. Do not use in production; see alternative answers instead.
At time of writing, the last upload for OpenJDK 7 was done '2016-04-22' with version 7u95 and still available as 'latest', where Ubuntu 14.04 has been updated to 7u181.
UPDATE : ALTHOUGH THIS IS THE MOST VOTED ANSWER ITS PROBABLY NOT THE ONE YOU WANT TO USE IN 2018 DUE TO LACK OF SECURITY UPDATES BY THIS PPA.
I found the following instructions which worked for me :
sudo add-apt-repository ppa:openjdk-r/ppa
sudo apt-get update
sudo apt-get install openjdk-7-jdk
This defines the “PPA for OpenJDK uploads (restricted)” as an additional package repositiory, updates your information, and installs the package with its dependencies (from that repository).
Edit 22-Jul-2019: This answer currently does not work. The below referenced JDK packages are no longer available on Debian Experimental. In any case, they lagged behind Ubuntu Trusty's packages which contained more recent security updates. Please refer to the other answers until this can be resolved (sorry, no ETA).
It does not look like the maintainer of openjdk-r/ppa will be updating the openjdk-7 package beyond version 7u95-2.6.4-3. That package's description "Copied from debian experimental in Primary Archive for Debian GNU/Linux" gives us a clue about how to handle this ourselves, though.
Option 1: Manual Installation
Download the packages intended for your architecture:
(for most users, this means amd64 if 64bit, or i386 if 32bit Ubuntu is installed)- openjdk-7-jdk
- openjdk-7-jre
- openjdk-7-jre-headless
- libjpeg62-turbo
- libfontconfig1 (only Ubuntu 17.10 and earlier; see note at bottom)
- fontconfig-config (only Ubuntu 17.10 and earlier; see note at bottom)
(Attempt to) install the packages using
dpkg:Ubuntu 17.10 and earlier:
sudo dpkg -i openjdk-7-* libjpeg62-turbo* libfontconfig1* fontconfig-config*Ubuntu 18.04 and later:
sudo dpkg -i openjdk-7-* libjpeg62-turbo*Check the output from
dpkg. If there were dependency problems – which is likely – you will see the following (with your architecture substituted for amd64):Errors were encountered while processing: openjdk-7-jre:amd64 openjdk-7-jre-headless:amd64 openjdk-7-jdk:amd64
If there were no dependency issues, great, you're done, skip to #4. Otherwise, if you need to resolve some dependency issues, this is handled with:
sudo apt install -fNotice, there is no need to re-run
dpkgafter lettingaptresolve dependencies. It will automatically finish installation of the openjdk packages.Update java alternatives. You can view all installed java versions with
update-java-alternatives --list. To activate OpenJDK Java 1.7, run:sudo update-java-alternatives -s java-1.7.0-openjdk-amd64You may notice an error about the
IcedTeaPlugin.soplugin being unavailable. This isn't a real concern for developers working with the JDK.Verify java is working:
java -versionwhich should output something similar to:
java version "1.7.0_161" OpenJDK Runtime Environment (IcedTea 2.6.12) (7u161-2.6.12-1) OpenJDK 64-Bit Server VM (build 24.161-b01, mixed mode)
Option 2: Automatic Installation (including updates with apt)
Pinning can be utilized to install and update openjdk-7-jdk and its dependencies from Debian repositories.
Create a pinning file that tells
aptto only consider packages that interest us (we certainly don't want our entire Ubuntu distribution "upgraded" with Debian experimental packages).Create file
/etc/apt/preferences.d/debianwith the below contents. You'll need superuser privileges, so use one ofsudo vim,sudo nano,gksudo gedit, etc.Package: * Pin: release o=Debian,n=experimental Pin-Priority: -1 Package: * Pin: release o=Debian,n=sid Pin-Priority: -1 Package: openjdk-7-jdk Pin: release o=Debian,n=experimental Pin-Priority: 500 Package: openjdk-7-jre Pin: release o=Debian,n=experimental Pin-Priority: 500 Package: openjdk-7-jre-headless Pin: release o=Debian,n=experimental Pin-Priority: 500 Package: libjpeg62-turbo Pin: release o=Debian,n=sid Pin-Priority: 500For Ubuntu 17.10 and earlier, also append the following (and see note at bottom):
Package: libfontconfig1 Pin: release o=Debian,n=sid Pin-Priority: 500 Package: fontconfig-config Pin: release o=Debian,n=sid Pin-Priority: 500Install the Debian keyring:
sudo apt install debian-archive-keyringNote: while this is the simplest method of adding the debian keyring, it may not be up to date. Check for output like the following when running
apt updatein step 4:W: GPG error: http://cdn-fastly.deb.debian.org/debian experimental InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8B48AD6246925553 NO_PUBKEY 7638D0442B90D010 E: The repository 'http://httpredir.debian.org/debian experimental InRelease' is not signed.
If you see this error, then manually add the necessary keys with:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8B48AD6246925553 sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 7638D0442B90D010where
8B48AD6246925553and7638D0442B90D010should match the pubkeys you see in the warning message.Add the needed repositories:
sudo add-apt-repository 'deb http://httpredir.debian.org/debian experimental main' sudo add-apt-repository 'deb http://httpredir.debian.org/debian sid main'Why not use a stable Debian repository? You'll run into unsatisfiable dependencies with Debian stable. The experimental (for openjdk-7) and sid (for libjpeg62-turbo, libfontconfig1, and fontconfig-config) repositories are more lenient with dependency versions.
Update
aptcache (expect this to take a while since Debian's package lists are big):sudo apt updateInstall openjdk-7-jdk:
sudo apt install openjdk-7-jdkUpdate java alternatives. You can view all installed java versions with
update-java-alternatives --list. To activate OpenJDK Java 1.7, run:sudo update-java-alternatives -s java-1.7.0-openjdk-amd64You may notice an error about the
IcedTeaPlugin.soplugin being unavailable. This isn't a real concern for developers working with the JDK.Verify java is working:
java -versionwhich should output something similar to:
java version "1.7.0_161" OpenJDK Runtime Environment (IcedTea 2.6.12) (7u161-2.6.12-1) OpenJDK 64-Bit Server VM (build 24.161-b01, mixed mode)
fontconfig notes
libfontconfig1 and fontconfig-config must be upgraded to 2.12 or later on Ubuntu 17.10 and earlier. The update packages from Debian do not contain Ubuntu's customizations, so some applications display ugly fonts with these packages installed; e.g. Charles Web Debugging Proxy. Depending on the programs you use, you may or may not be affected by this problem.
Try using SDKMan, which allows to install and manage multiple java versions.
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:
- openjdk-7-jdk_7u211-2.6.17-1~deb8u1_amd64.deb
- openjdk-7-jre-headless_7u211-2.6.17-1~deb8u1_amd64.deb
edit your eclipse.ini file and add a "-vm" with the full path to the java command to use
Don't sudo apt-get install sun-java7-jdk work as a unprivileged user? (i couldn't comment sorry).
You could check out http://168.site90.net/doku.php?id=ubuntu-download-and-install-jdk-bin
That may help you.
I'm going to respond to my own question here to synthesize all my findings and the answers by @Agemen and @Kowser above.
- OpenJDK is a reference implementation and does not change unless the spec changes
- There is an OpenJDK update project which implements all updates in source (http://openjdk.java.net/projects/jdk7u/, source http://hg.openjdk.java.net/jdk7u/jdk7u-dev)
- OpenJDK will not provide any compiled or packaged updates. In fact, OpenJDK provided binaries for the initial release just as a convenience.
- It is the responsibility of third party OS/distributors to compile and package Java. E.g. RedHat and Ubuntu
- No third party has yet released updates for Java 7
- These third parties typically use IcedTea to do the compilation and packaging, but IcedTea itself does not do so. http://icedtea.classpath.org/wiki/Main_Page
We now have a combination of things that are making usage of Java really painful in open source server deployment
- Oracle JDK has updates (including security fixes) that no OpenJDK package has. This makes using anything other than Oracle JDK result in poorer security
- Oracle JDK can no longer be packaged distributed by third parties (e.g. Ubuntu). Now we have to install it by hand or script it, and maintain it, on all our servers.
I just don't get it...
Marc
EDIT
As @Krige pointed out, things seems to have finally kicked into gear with OpenJDK builds available with the latest updates!
I may be wrong, but I think sources can be retrieved with mercurial on a different repository. It seems to be dedicated from the one linked by Peter Lawrey in a comment on the question. The addrees is http://hg.openjdk.java.net/jdk7u/jdk7u-dev
I don't know exactly how branches and tags are managed by Oracle and the OpenJDK contributors, but maybe are the first stable released definitely frozen, and a cloned repo is used instead to ensure inclusion of fixes...
To answer the question, I'm not sure that the OpenJDK sites are supposed to propose any packaged version of the JDK. Oracle's infrastructure is made for that, I guess... I may have missed something, but I think the packaged JDK's that are given on the Oracle website is jsut a bundled, compiled version of the OpenJDK. As it has become the reference implementation, and is actively maintained Oracle, I can't see why it should be different.
EDIT : BTW, I can't find a direct link that I can use to download a packaged OpenJDK on the OpenJDK website, even for the first stable release. But once again, I may miss something obvious :-p
EDIT 2 : I've fixed the link - you know have the link to the repo of all the sources, not only the jdk ;-)
Moreover, as pointed in a link given in the comments, there are many projects under OpenJDK... So the repo structure is a bit complex, with hg "forests" (that I didn't know before trying to compile OpenJDK 7 by myself...).