HOW TO: install the latest Oracle (Sun) Java JRE in openSUSE 12.1

Oracle (Sun) Java JRE has been removed from the repositories of openSUSE 12.1. License troubles…
openSUSE 12.1 Release Notes

However, should you still want it: I have written a how-to for manual installation of Oracle (Sun) Java JRE in openSUSE 12.1:
Oracle (Sun) Java for openSUSE - Easy Linux tips project

Installing should be quite easy now; just follow the instructions with precision. :slight_smile:

Have fun, Pjotr.

Very detailed and newbie-friendly step-by-step tutorial, well done. :slight_smile:

vboxlive](http://forums.opensuse.org/english/get-technical-help-here/how-faq-forums/unreviewed-how-faq/465445-running-linux-live-cds-disk-less-virtual-machines-under-virtualbox.html) can be used to install Oracle VirtualBox too. It will take care of kernel sources, install the Extension pack and add yourself to the vboxusers group. It’s not even necessary to explicitely install VirtualBox, since it will be installed if it’s missing the first time you boot a distro live CD in a virtual machine. However to just install VirtualBox, you can type:

vboxlive --install

vboxlive is included in package vmscripts availalbe in my repo.

Great tutorial but im stuck on step 9. When i copy paste your command update-alternatives --install “/usr/bin/java” “java” “/opt/java/64/jre1.6.0_30/bin/java” 1 i get the following messages:

Altair:/opt/java/64 # update-alternatives --install “/usr/bin/java” “java” “/opt/java/64/jre1.6.0_30/bin/java” 1
update-alternatives: warning: forcing reinstallation of alternative /opt/java/64/jre1.6.0_30/bin/java because link group java is broken.
update-alternatives: warning: not replacing /usr/bin/java with a link.

Even if i run the command a few times i get the same message every time. How can i fix the problem?

Several things are possible, among which a corrupt bin file.

Try this:

  • Remove your Java by deleting /opt/java
  • Apply the how-to again, with a freshly downloaded installation file from the Oracle website.

Tried again, same issue. I am using gnome if that makes a difference. I see that i can get it in add or remove software now, but when i do that im not able to compile and run java programs from the command line.

Good work Pjtor! This helped me to get my bank connection back online, so thank you!

BTW for system wide sun java firefox installation making the symbolic link in the directory below should suffice:
/usr/lib64/firefox/plugins

best esa
LNAFIN

If its just the browser plugin you want to change (not necessarily the whole systems java) then download and install the sun java rpm

cd /usr/lib64/browser-plugins
rm javaplugin.so
ln -s /usr/java/latest/lib/amd64/libnpjp2.so javaplugin.so

obviously change lib and java folders as needed. this will set firefox, chrome and opera

I’ve just tried to go through this how-to but got stuck at the point where we inform the system of the new JRE default. I get the following error:

suntp001:~/Downloads # update-alternatives --install "/usr/bin/java" "java" "/opt/java/32/jre1.7.0_04/bin/java" 1
Absolute path to 'update-alternatives' is '/usr/sbin/update-alternatives', so running it may require superuser privileges (eg. root).

I’m using 32bit JRE and followed everything to the letter up until this point. I tried it a couple of times, redownloading the file, with the same result.

On 2012-05-17 20:16, suse tpx60s wrote:

> Code:
> --------------------
> suntp001:~/Downloads # update-alternatives --install “/usr/bin/java” “java” “/opt/java/32/jre1.7.0_04/bin/java” 1
> Absolute path to ‘update-alternatives’ is ‘/usr/sbin/update-alternatives’, so running it may require superuser privileges (eg. root).
> --------------------

He, he! You need to use “su -”, not “su”.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

Thanks for the reply. The How-To didn’t mention that. It said to use “su -p” which I did. Using just “su -” as you suggested does of course work so I guess the How-To needs to be adjusted. I’ll PM the OP and mention it.

That warning is just optical: su -p does the job fine… The warning is being generated because the system sees that the command is being issued with the user variables (the -p), and then mistakenly thinks that maybe you have no root authority. So it spawns the warning message. But the job is being done anyway…

Nevertheless, it can be confusing for the people who apply my how-to. So I’ll see what I can do about it. :slight_smile:

–edit:
I’ve just added an explanation of this phenomenon to the how-to.

On 2012-05-18 12:16, pjotr123 wrote:
>
> The error is just optical: su -p does the job fine… The error report
> is being generated because the system sees that the command is being
> issued with the user variables (the -p), and then mistakenly assumes
> that there’s no root authority. So it spawns the error message. But the
> job is being done anyway…

What is the rationale for preserving the environment? Doing administrative
tasks works better with root environments. In this case it is just a
warning, but often you get an error. I can only think of having faster
access to the download path.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

Faster access to the download path was exactly the reason… I wanted to keep the how-to as short as possible, and in the beginning I need su -p for the download path. :slight_smile:

Tutorial looks just great! No luck to see tutorial on making old-style gnome dialogs interface?