Installing Oracle (sun) Java JRE/JDK 1.7 update 7 on openSUSE 12.2 x86_64

Installing Oracle (sun) Java JRE/JDK 1.7 update 7 on openSUSE 12.2 x86_64

Installing Oracle Java 1.7 on openSUSE 12.2, is much like installing Oracle Java on openSUSE 12.1. Here are the steps to install Oracle Java, and to utilize the Oracle Java Plugin for your browser(s).

Download the RPM version of Java JRE from oracle’s website.

Install the jdk with yast2, zypper, or by clicking the rpm within dolphin or nautilus:

sudo zypper in jre-7u7-linux-x64.rpm -y

That’s the easy part. By default the openjdk and Iced Tea plugins are the default, even after installing the oracle java. To change this, you’ll have to update the alternatives.

The steps are to:
Install the alternative
Configure the alternative (depending on how it was installed)
Enjoy

First you’ll install the java alternative:

sudo /usr/sbin/update-alternatives --install "/usr/bin/java" "java" "/usr/java/latest/bin/java" 20000

Now install the alternative for your browser plugin:
For JRE:

sudo /usr/sbin/update-alternatives --install "/usr/lib64/browser-plugins/javaplugin.so" "javaplugin" "/usr/java/latest/lib/amd64/libnpjp2.so" 20000

For JDK:

sudo /usr/sbin/update-alternatives --install "/usr/lib64/browser-plugins/javaplugin.so" "javaplugin" "/usr/java/latest/jre/lib/amd64/libnpjp2.so" 20000

Note the following format with the installation:

--install

I’ve chosen priority 20000 because that will make your new java the default java utilizing priority auto mode.

You can now verify that this is correct with:

/usr/sbin/update-alternatives --query (or --display) java (or javaplugin)

It’s really that easy.

About ben.kevan

I am ben kevan.. Well yeah. .that's about it. More Posts

11 Comments to “Installing Oracle (sun) Java JRE/JDK 1.7 update 7 on openSUSE 12.2 x86_64”

  1. Tnks for share, Ben K., that’s exactly what i look for.

    best regards

  2. Luciano Musi // January 17, 2013 at 2:26 pm //

    The best solution, very simple and clear.
    Thank’s a lot.

  3. Andreas Otto // January 31, 2013 at 12:57 am //

    install in opensuse (lxc-container)

    # zypper in jdk-7u11-linux-x64.rpm
    Loading repository data…
    Reading installed packages…
    Resolving package dependencies…

    The following NEW package is going to be installed:
    jdk

    1 new package to install.
    Overall download size: 104.7 MiB. After the operation, additional 161.2 MiB will be used.
    Continue? [y/n/?] (y):
    Retrieving package jdk-2000:1.7.0_11-fcs.x86_64 (1/1), 104.7 MiB (161.2 MiB unpacked)
    Retrieving package jdk-2000:1.7.0_11-fcs.x86_64 (1/1), 104.7 MiB (161.2 MiB unpacked)
    Installing: jdk-2000:1.7.0_11-fcs ……………………………………………………………………………………….[done]
    Additional rpm output:
    Unpacking JAR files…
    rt.jar…
    Error: Could not open input file: /usr/java/jdk1.7.0_11/jre/lib/rt.pack
    jsse.jar…
    Error: Could not open input file: /usr/java/jdk1.7.0_11/jre/lib/jsse.pack
    charsets.jar…
    Error: Could not open input file: /usr/java/jdk1.7.0_11/jre/lib/charsets.pack
    tools.jar…
    Error: Could not open input file: /usr/java/jdk1.7.0_11/lib/tools.pack
    localedata.jar…
    Error: Could not open input file: /usr/java/jdk1.7.0_11/jre/lib/ext/localedata.pack

  4. You are my inhalation , I have few web logs and sometimes run out from to post .

  5. OMG This is why linux never gonna rule, more than 10 command line commands to install java. lol

  6. Yeah with that attitude its not going to, anyway we don’t need people like you who need to be spoon-fed their software, because God forbid you learn how things work. Get out of here.

  7. Oh and learn to count, it was four commands to install, how did you come out with ten? Pulled six out of your bum?

  8. 4 command and still only java 7.21…

Leave a comment

Your email address will not be published.

*