Wednesday, January 6, 2016

Installing an obsolete java version on Linux

for example if you have java 8 and want to install java 7, get the rpm of java 7

and install it with rpm command with '--nodeps' option:

rpm -ivh /tmp/java-1.7.0-openjdk-1.7.0.75-2.5.4.2.fc20.x86_64.rpm --nodeps

after installation set your JAVA_HOME to 1.7.

list of java installations on your machine can be obtained through the below command:

alternatives --config java