Java: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
(21 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
== RHEL7 == | == RHEL7 == | ||
We are using '''java-11-openjdk''', install it with command (as well as ''groovy''): | |||
yum install java-11-openjdk-devel groovy | |||
alternatives --config java | |||
'''DO NOT DO IT''' Installation from tar: | |||
cp /usr/downloads/jdk-8u211-linux-x64.tar.gz /usr/lib/jvm | |||
cd /usr/lib/jvm/ | |||
tar xvf jdk-8u211-linux-x64.tar.gz | |||
rm jdk-8u211-linux-x64.tar.gz | |||
Set link to be compatible with older installation: | |||
cd /usr/lib/jvm | |||
ln -s jdk1.8.0_211 java-1.8.0-oracle | |||
May not need following: | |||
cd /usr/lib/jvm/jdk1.8.0_211/ | |||
alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.8.0_211/bin/java 2 | |||
alternatives --config java # type the number of desired version | |||
##alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk1.8.0_211/bin/jar 2 | |||
##alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.8.0_211/bin/javac 2 | |||
##alternatives --set jar /usr/lib/jvm/jdk1.8.0_211/bin/jar | |||
##alternatives --set javac /usr/lib/jvm/jdk1.8.0_211/bin/javac | |||
Command | |||
java -version | |||
should return | |||
java version "1.8.0_211" | |||
Java(TM) SE Runtime Environment (build 1.8.0_211-b12) | |||
Java HotSpot(TM) 64-Bit Server VM (build 25.211-b12, mixed mode) | |||
== RHEL7, RHEL6 == | |||
'''NOT SUPPORTED BY RHEL ANY MORE''' | |||
Install following packages: | |||
yum install java-1.8.0-oracle | yum install java-1.8.0-oracle | ||
yum install java-1.8.0-oracle-devel | yum install java-1.8.0-oracle-devel java-1.8.0-oracle-javafx java-1.8.0-oracle-jdbc java-1.8.0-oracle-plugin java-1.8.0-oracle-src | ||
'''DO NOT DO THAT !''' Fix symbolic links in ''/etc/alternatives'' area: | |||
cd /etc/alternatives | |||
rm -f java | |||
ln -s /usr/lib/jvm/java-1.8.0-oracle-1.8.0.51-1jpp.2.el7_1.x86_64/jre/bin/java java | |||
rm -f javac | |||
ln -s /usr/lib/jvm/java-1.8.0-oracle-1.8.0.51-1jpp.2.el7_1.x86_64/bin/javac javac | |||
Install groovy (RHEL7): | |||
yum install groovy groovy-javadoc | |||
Install groovy (RHEL6): |
Latest revision as of 22:19, 20 July 2023
This page describes java installation for clon machines.
RHEL7
We are using java-11-openjdk, install it with command (as well as groovy):
yum install java-11-openjdk-devel groovy alternatives --config java
DO NOT DO IT Installation from tar:
cp /usr/downloads/jdk-8u211-linux-x64.tar.gz /usr/lib/jvm cd /usr/lib/jvm/ tar xvf jdk-8u211-linux-x64.tar.gz rm jdk-8u211-linux-x64.tar.gz
Set link to be compatible with older installation:
cd /usr/lib/jvm ln -s jdk1.8.0_211 java-1.8.0-oracle
May not need following:
cd /usr/lib/jvm/jdk1.8.0_211/ alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.8.0_211/bin/java 2 alternatives --config java # type the number of desired version
##alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk1.8.0_211/bin/jar 2 ##alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.8.0_211/bin/javac 2 ##alternatives --set jar /usr/lib/jvm/jdk1.8.0_211/bin/jar ##alternatives --set javac /usr/lib/jvm/jdk1.8.0_211/bin/javac
Command
java -version
should return
java version "1.8.0_211" Java(TM) SE Runtime Environment (build 1.8.0_211-b12) Java HotSpot(TM) 64-Bit Server VM (build 25.211-b12, mixed mode)
RHEL7, RHEL6
NOT SUPPORTED BY RHEL ANY MORE
Install following packages:
yum install java-1.8.0-oracle yum install java-1.8.0-oracle-devel java-1.8.0-oracle-javafx java-1.8.0-oracle-jdbc java-1.8.0-oracle-plugin java-1.8.0-oracle-src
DO NOT DO THAT ! Fix symbolic links in /etc/alternatives area:
cd /etc/alternatives rm -f java ln -s /usr/lib/jvm/java-1.8.0-oracle-1.8.0.51-1jpp.2.el7_1.x86_64/jre/bin/java java rm -f javac ln -s /usr/lib/jvm/java-1.8.0-oracle-1.8.0.51-1jpp.2.el7_1.x86_64/bin/javac javac
Install groovy (RHEL7):
yum install groovy groovy-javadoc
Install groovy (RHEL6):