All of the installation instructions reference using apt-get to install the default-jre package, which is fine, but as of this writing that installs OpenJDK Java 1.8.0_171. One of our applications has trouble with this version and the vendor is telling us that the last version they certify is 1.8.0_131. We have other servers in production with that version, but we can't seem to find a download or way to specify the _131 version when installing on a new server. Is there a repository of older versions of packages we can pull from and install manually? Any way to "copy" an installed package from one machine to another?
I have found mirror hosting debian packages for OpenJDK (1.8.0_131).
You can download following debian packages for your required version 1.8.0_131.
openjdk-8-dbg_8u131-b11-2ubuntu1.16.04.3_amd64.deb openjdk-8-demo_8u131-b11-2ubuntu1.16.04.3_amd64.deb openjdk-8-jdk-headless_8u131-b11-2ubuntu1.16.04.3_amd64.deb openjdk-8-jdk_8u131-b11-2ubuntu1.16.04.3_amd64.deb openjdk-8-jre-headless_8u131-b11-2ubuntu1.16.04.3_amd64.deb openjdk-8-jre-jamvm_8u131-b11-2ubuntu1.16.04.3_amd64.deb openjdk-8-jre_8u131-b11-2ubuntu1.16.04.3_amd64.deb openjdk-8-source_8u131-b11-2ubuntu1.16.04.3_all.
Above packages are for Ubuntu 16.04 LTS. You can copy to any other system and install manually using
sudo dpkg -i command.
You can also download following tar file for manually installing openjdk using same link.
So, for the second half of my question about copying a package from one install to another, I was able to use the
dpkg-repack package to generate a .deb file of the OpenJDK packages needed to install it 'offline' on another server as follows:
apt-get install dpkg-repack dpkg-repack openjdk-8-jre-headless dpkg-repack openjdk-8-jre dpkg-repack ca-certificates-java dpkg-repack java-common
On the target server I removed the
ca-certificates-java packages using
apt-get remove to clear out the more recent version.
The older version could then be installed using (adjust filenames as needed):
dpkg -i openjdk-8-jre-headless_8u131-b11-2ubuntu1.16.04.3_amd64.deb ca-certificates-java_20160321_all.deb
The headless package and certificates had to be installed together (dependency issue separately). Then the others can be added (not sure if they're needed, but it worked for me):
dpkg -i openjdk-8-jre_8u131-b11-2ubuntu1.16.04.3_amd64.deb dpkg -i java-common_0.56ubuntu2_all.deb
After running all this,
java -version gives me the expected output for the desired version:
openjdk version "1.8.0_131" OpenJDK Runtime Environment (build 1.8.0_131-8u131-b11-2ubuntu1.16.04.3-b11) OpenJDK 64-Bit Server VM (build 25.131-b11, mixed mode)
NOTE: This covers copying a package from a server where you already have the desired version available. If anyone can answer the first question, e.g. if there's an online repository or other way to download and install a specific OpenJDK build, please add that as an answer as well as that would be a more desirable way to approach this for future installations.