$ sudo yum install java-1.8.0-amazon-corretto-devel
$ sudo alternatives --config java
There are 2 programs which provide 'java'.
Selection Command
-----------------------------------------------
*+ 1 /usr/lib/jvm/java-17-amazon-corretto.x86_64/bin/java
2 /usr/lib/jvm/java-1.8.0-amazon-corretto.x86_64/jre/bin/java
Enter to keep the current selection[+], or type selection number: 2
$ java -version
openjdk version "1.8.0_382"
OpenJDK Runtime Environment Corretto-8.382.05.1 (build 1.8.0_382-b05)
OpenJDK 64-Bit Server VM Corretto-8.382.05.1 (build 25.382-b05, mixed mode)