I got an assist and was able to install what I wanted. I did:
[ec2-user@ip-172-31-9-107 nifi]$ yum search java | grep "1.8"
Last metadata expiration check: 1:00:33 ago on Tue Aug 8 18:28:56 2023.
java-1.8.0-amazon-corretto.x86_64 : Amazon Corretto runtime environment
java-1.8.0-amazon-corretto-devel.x86_64 : Amazon Corretto development environment
,and then:
sudo yum install java-1.8.0-amazon-corretto.x86_64
which installed:
[ec2-user@ip-172-31-9-107 nifi]$ java -version
openjdk version "1.8.0_382"
Answer from Timothy Clotworthy on Stack Overflowjava - OpenJDK 1.8.0 installs jre but not jdk? - Stack Overflow
rhel - yum + dependencies not logical when installing openjdk - Unix & Linux Stack Exchange
How to install Java SDK on CentOS? - Stack Overflow
centos - java -version is not showing OpenSDK - Unix & Linux Stack Exchange
Videos
yum search jdk
Results:
java-1.8.0-openjdk.x86_64 : OpenJDK Runtime Environment
java-1.8.0-openjdk-devel.x86_64 : OpenJDK Development Environment
So you could likely run:
yum install java-1.8.0-openjdk.x86_64 java-1.8.0-openjdk-devel.x86_64
If that doesn't work, try a yum clean all and repeat.
Edit: You could also search the FTP repo link you posted...

i figured
bash$ grep openjdk /etc/yum.conf
exclude=*.i?86 *openjdk* java*
and can't believe spent a long time at everything else. works now after removing the exclusion. very naive!
java-1.8.0-openjdk-devel and java-1.8.0-openjdk versions need to match exactly.
in short:
yum downgrade java-1.8.0-openjdk-1.8.0.161-2.b14.el7
yum install java-1.8.0-openjdk-devel-1.8.0.161-2.b14.el7.x86_64.rpm
I just wrote a whole answer to this question here: https://stackoverflow.com/questions/57498755/installing-python36-devel-on-rhel7-failing/57519956#57519956
You can try to fix it with yumdownloader:
# Install yumdownloader
yum install yum-utils
# Download the missing packages
yumdownloader java-1.8.0-openjdk --resolve --destdir pkgs
# Install all at once
yum install pkgs/*.rpm
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"