You might simply build this yourself. If it worked before, chances are the build for Fedora works. You will need a Fedora 34+ host to cross-build this.
# Don't build as root. Only need root privileges to install `fedpkg`,
sudo dnf install -y fedpkg
# Now get the package description
git clone https://src.fedoraproject.org/rpms/java-17-openjdk
# Use fedpkg to kick off a mock build
cd java-17-openjdk
fedpkg mockbuild --root centos-7-x86_64
This will take a while¹; and in the end, you should be getting a line that tells you where the RPMs you've just built were put.
¹ mock sets up a chroot, in which it installs a CentOS 7 base system, then EPEL, which you'll almost certainly will need, I think, then the tools necessary to build any RPM, then the build-time dependencies of the java-17-openjdk package. Then it will download all the necessary source code, hand off to rpm-build to do the build, which includes applying all patches, then compiling OpenJDK, then, running the OpenJDK installation, collecting the installed files, compressing them into valid RPMs.
rpm - OpenJDK 17 for CentOS 7 - Unix & Linux Stack Exchange
How to install Java SDK on CentOS? - Stack Overflow
Will CentOS 7 include a java-17-openjdk package in yum
CentOS log4j vulnerabilities?
Videos
You might simply build this yourself. If it worked before, chances are the build for Fedora works. You will need a Fedora 34+ host to cross-build this.
# Don't build as root. Only need root privileges to install `fedpkg`,
sudo dnf install -y fedpkg
# Now get the package description
git clone https://src.fedoraproject.org/rpms/java-17-openjdk
# Use fedpkg to kick off a mock build
cd java-17-openjdk
fedpkg mockbuild --root centos-7-x86_64
This will take a while¹; and in the end, you should be getting a line that tells you where the RPMs you've just built were put.
¹ mock sets up a chroot, in which it installs a CentOS 7 base system, then EPEL, which you'll almost certainly will need, I think, then the tools necessary to build any RPM, then the build-time dependencies of the java-17-openjdk package. Then it will download all the necessary source code, hand off to rpm-build to do the build, which includes applying all patches, then compiling OpenJDK, then, running the OpenJDK installation, collecting the installed files, compressing them into valid RPMs.
Use Temurin. You'll need the Adoptium yum repo configuration from https://adoptium.net/installation/linux/
The following command will return a list of all packages directly related to Java. They will be in the format of java-<version>.
$ yum search java | grep 'java-'
If there are no available packages, then you may need to download a new repository to search through. I suggest taking a look at Dag Wieers' repo. After downloading it, try the above command again.
You will see at least one version of Java packages available for download. Depending on when you read this, the lastest available version may be different.
java-1.7.0-openjdk.x86_64
The above package alone will only install JRE. To also install javac and JDK, the following command will do the trick:
$ yum install java-1.7.0-openjdk*
These packages will be installing (as well as their dependencies):
java-1.7.0-openjdk.x86_64
java-1.7.0-openjdk-accessibility.x86_64
java-1.7.0-openjdk-demo.x86_64
java-1.7.0-openjdk-devel.x86_64
java-1.7.0-openjdk-headless.x86_64
java-1.7.0-openjdk-javadoc.noarch
java-1.7.0-openjdk-src.x86_64
@Sventeck, perfecto.
redhat docs are always a great source - good tutorial that explains how to install JDK via yum and then setting the path can be found here (have fun!) - Install OpenJDK and set $JAVA_HOME path
OpenJDK 6:
yum install java-1.6.0-openjdk-devel
OpenJDK 7:
yum install java-1.7.0-openjdk-devel
To list all available java openjdk-devel packages try:
yum list "java-*-openjdk-devel"