Issue
I have a centOS7 server, and want to have JDK1.6_15 on it. I update the /etc/profile scripts to have JAVA_HOME variable correct. The PATH is also updated with JAVA_HOME in first place.
But, when I launch "java -version" command, I have JDK1.8 OpenJDK displayed !
When I launch the "alternatives --config java" command, I have only :
java-1.8.0-openjdk.x86_64 (/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.342.b07-1.el7_9.x86_64/jre/bin/java)
So I force things with :
alternatives --install /usr/bin/java java /opt/jdk1.6.0_15/bin/java 1
alternatives --install /usr/bin/javac javac /opt/jdk1.6.0_15/bin/javac 1
It's ok now, but, it seems not really correct to me to do this, it's weird no ?
Is there a way to install properly with yum the OpenJDK1.6 but precisely 1.6.0_15 version, not another ?
Solution
Finally, we couldn't do another way, it's the right way, so I let the things like they are
Answered By - user2178964 Answer Checked By - Pedro (WPSolving Volunteer)