Database Reference
In-Depth Information
Note
Note that the 7u67 part of the filename may be different for you. It was the latest
version at the time of writing of this topic.
Configuring Oracle JRE as default : If you have OpenJDK on your server ma-
chine, you will have to set it as an alternative, and use Oracle JRE by default. The
RHEL family has a utility called alternatives inspired by Debian's
update-dependencies utility for conflict resolution in cases where there are
multiple software applications that perform similar functionalities, but the user
will prefer one type of software to be the default for those functions.
Note
The alternatives utility takes four parameters to install software as default: a sym-
bolic link to where the software is to be installed, the generic name of the software, the ac-
tual path of where the software is installed, and a priority that determines which type of
software is to be chosen by default. The highest-priority software is set to the default.
The following code block will go through the details of the process:
# See the details Default: OpenJDK, priority: 16000
$ alternatives --display java java - status is auto. link
currently points to /usr/lib/jvm/jre-1.6.0-openjdk.x86_64/
bin/java /usr/lib/jvm/jre-1.6.0-openjdk.x86_64/bin/java -
priority 16000
# Install Oracle JRE with HIGHER preference
$ sudo alternatives --install /usr/bin/java java /usr/java/
jre1.7.0_64/bin/java 31415
# See the details
$ alternatives --display java java - status is auto. link
currently points to /usr/java/jre1.6.0_34/bin/java
/usr/lib/jvm/jre-1.6.0-openjdk.x86_64/bin/java - priority
16000 [-- snip --]
/usr/java/jre1.7.0_67/bin/java - priority 31415 [-- snip --]
Current `best' version is /usr/java/jre1.6.0_34/bin/java.
# View the current version
Search WWH ::




Custom Search