Setup Oracle Java jre 1.7 on Centos 6.3

  • 06 Feb, 2013

Download the rpm file from java.com

Install using the rpm command

rpm -Uvh jre-7u13-linux-x64.rpm

Use alternatives to config

# alternatives –config java

There are 3 programs which provide ‘java’.

  Selection    Command
---––––––––––––––––––––––
\*  1           /usr/java/latest/jre/bin/java
 + 2           /usr/java/jre1.7.0_13/bin/java
   3           /usr/java/jdk1.7.0_13/jre/bin/java

Enter to keep the current selection[+], or type selection number:

Select the java you want to use in my case 2

Test using the command #java -version

java -version
java version “1.7.0_13”
Java(TM) SE Runtime Environment (build 1.7.0_13-b20)
Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)
[root@localhost plugins]#

Create links in the Mozilla Plugins directory so Java will work in supported browsers such as Firefox.

# cd /usr/lib64/mozilla/plugins/

ln -fs /usr/java/latest/lib/amd64/libnpjp2.so

Related Posts

Error when run dnf install rpm-build

  • 31 Mar, 2025

I was installing the IBM MQ Server on a linux box yesterday. I got the error bellow: \root@gateway MQServer\ dnf install rpm-build
Updating Subscription Management repositories.
Instana 14 B/s |

Error when run dnf install rpm-buildRead More

How to Install watch on macOS Sequoia

  • 06 Feb, 2025

The watch command is a useful utility in Unix-like systems that allows you to execute a command periodically and display its output. However, macOS does not come with watch pre-installed. If you're ru

How to Install watch on macOS SequoiaRead More

rsync is faster than scp to copy files between machines

  • 31 Dec, 2024

rsync is generally faster than scp for copying files, especially when transferring a large amount of data or syncing directories. Here's why: 1. Incremental Transfers - rsync: Only transfers the p

rsync is faster than scp to copy files between machinesRead More