How To Install Latest Oracle (Sun) Java JRE In openSUSE

by
Share this Article: Facebook16Google+2Twitter10LinkedIn0Reddit0StumbleUpon0

Let me show you how i installed latest java and java-plugin in my openSUSE 12.3 64bit system.

This my system:

# cat /etc/issue
Welcome to openSUSE 12.3 "Dartmouth" - Kernel \r (\l).
# uname -a
Linux linux-386s.site 3.7.10-1.16-desktop #1 SMP PREEMPT Fri May 31 20:21:23 UTC 2013 (97c14ba) x86_64 x86_64 x86_64 GNU/Linux
linux-386s:/home/pirat9/Downloads #

First Download the file from the oracle website.

Download the rpm installer jre-7u40-linux-x64.rpm from the oracle java site at http://www.oracle.com/technetwork/java/javase/downloads/jre7-downloads-1880261.html.

Run as root:

rpm -Uvh jre-7u40-linux-x64.rpm
update-alternatives --install "/usr/bin/java" "java" "/usr/java/jre1.7.0_40/bin/java" 1
update-alternatives --set java /usr/java/jre1.7.0_40/bin/java
update-alternatives --install "/usr/lib64/browser-plugins/javaplugin.so" "javaplugin" "/usr/java/jre1.7.0_40/lib/amd64/libnpjp2.so" 1
update-alternatives --set javaplugin /usr/java/jre1.7.0_40/lib/amd64/libnpjp2.so
 

  Now check with root user:

update-alternatives --list java
update-alternatives --list javaplugin
update-alternatives --config java
update-alternatives --config javaplugin

For 32bit version:

update-alternatives --install "/usr/bin/java" "java" "/usr/java/jre1.7.0_40/bin/java" 1
update-alternatives --set java /usr/java/jre1.7.0_40/bin/java
update-alternatives --install "/usr/lib/browser-plugins/javaplugin.so" "javaplugin" "/usr/java/jre1.7.0_40/lib/i386/libnpjp2.so" 1
update-alternatives --set javaplugin /usr/java/jre1.7.0_40/lib/i386/libnpjp2.so

To verify the Java version, run the following commands as root user.

java -version
java version "1.7.0_40"
Java(TM) SE Runtime Environment (build 1.7.0_40-b43)
Java HotSpot(TM) 64-Bit Server VM (build 24.0-b56, mixed mode)

snapshot1

For questions please refer to our Q/A forum at : http://ask.unixmen.com/

Share this Article: Facebook16Google+2Twitter10LinkedIn0Reddit0StumbleUpon0