OpenJDK8 tgz download?

Latest response

I have an environment where everything runs in userspace (basically no root access), so I cannot use rpm packages.

I see that the linux OpenJDK8 is only available as rpm downloads. Is there any other option to get a linux binary archive download?

Is extracting the files from the rpm via the rpm2cpio a viable alternative?

Responses

Hi,

a) If it is for development, you can go to:

https://developers.redhat.com/products/openjdk/download

b) Oracle offers JRE and JDK also as *.tar.gz for Linux.

c) Your option should work too. As long you somehow download the RPM...

The commands to download RPMs need privileged account. Example:

$ sudo yum install --downloadonly --downloaddir=/home/mydir java-1.8.0-openjdk

$ sudo yum install --downloadonly --downloaddir=/home/mydir java-1.8.0-openjdk-headless.x86_64

Then, to extract the RPMs, you do not need privileged access:

$ rpm2cpio  java-1.8.0-openjdk-1.8.0.232.b09-0.el7_7.x86_64.rpm | cpio -idmv

$ rpm2cpio  java-1.8.0-openjdk-headless-1.8.0.232.b09-0.el7_7.x86_64.rpm | cpio -idmv

$ /home/mydir/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.232.b09-0.el7_7.x86_64/jre/bin/java -version
openjdk version "1.8.0_232"
OpenJDK Runtime Environment (build 1.8.0_232-b09)
OpenJDK 64-Bit Server VM (build 25.232-b09, mixed mode)

Set classpath and variables accordingly, and you should be able to use Java.

Regards,

Dusan Baljevic (amateur radio VK2COT)

Thanks for your reply Dusan,

a) There are no tgz downloads for OpenJDK8 at https://developers.redhat.com/products/openjdk/download

b) I am currently using the Oracle JDK as you noted, but am required to cease using it, so trying to move to OpenJDK

c) I am already downloading the rpms using "yumdownloader" as non-root user, and do the rpm2pio|cpio to extract the binaries, but hoping for a cleaner solution (prefer an official tgz archive download)

Hi Charles Did you find any cleaner solution than using rpm2pio? I'm looking for openjdk 8 tgz for linux (x86, not x64) and I'm really surprised to be unable to find any repository with a standalone tgz java

I am also looking for a openjdk 8 tgz for linux download as well. Has anyone found a solution? I am also surprised that they have limited the linux tgz downloads to just java 9 and higher.