Java JRE 7 on OpenSUSE 12.1

Hi there,

I am attempting to install Oracle java on OpenSUSE 12.1. I have installed and configured it as an alternative and all appears to be well. However when I look at the value of JAVA_HOME it shows as:


Although this link does not appear to exist. In the JVM directory I have the listing of:

total 4
drwxr-xr-x 4 root root 4096 Feb 24 20:38 java-1.6.0-openjdk-1.6.0
lrwxrwxrwx 1 root root 27 Feb 24 20:38 jre-1.6.0 -> /etc/alternatives/jre_1.6.0
lrwxrwxrwx 1 root root 28 Feb 24 20:38 jre-1.6.0-openjdk -> java-1.6.0-openjdk-1.6.0/jre
lrwxrwxrwx 1 root root 29 Feb 24 20:38 jre-openjdk -> /etc/alternatives/jre_openjdk

I tried to use the update-alternatives to install a JRE but received a message about it being a slave to java. I’m a little confused with that message as the java config appears to be working ok the sym link was updated and java -version returns the message I would expect.

Should I just update JAVA_HOME to point to the directory I wish to use (/usr/java/jdk1.7.0_03/jre/)?

I’d prefer to use update-alternatives to perform the config incase I decide to switch versions at a later time. Can somebody help make sense of this information, I’m a little lost at what would be the best action to take.



You might want to try going to yast & uninstalling the openjdk plugin. Just the plugin now not the rest of openjdk Libre office uses that.
One more thing Welcome to Opensuse & its forum!

Hi Jay, I used this guide to install JRE 6; Oracle (Sun) Java for openSUSE and Fedora - Easy Linux tips project
Or you can use this repo for version 7; Index of /repositories/Java:/sun:/Factory/openSUSE_Factory

Thanks for the suggestions and the welcome. :slight_smile:

I ended up creating the soft link in the directory so I now have

/usr/lib64/jvm/jre -> /usr/java/jdk1.7.0_03/jre/

It appeared to resolve the issue I was having. I wasn’t sure if this would cause a problem going forward with the usage of update-alternatives.

I wish I had read the thread a bit earlier just spent a bit of time trying to get libreoffice working. Ended up reinstalling with zypper, I guess it was connected to my tinkering with the java builds!

runs off to check the java fix still works :slight_smile:

I haven’t done this for a few years now, but I remember that I had to create a profile specifying the Java properties. IIRC it included but there is more than just specifying the JAVA_HOME directory.

Recommend you do a search using keywords

tsu2 java update-alternatives

If the archives from about 4-6 years ago are still accessible, those posts should include exactly what I did then which should be the best recommended approach even today AFAIK.

If you really can’t find it, re-post here and I’ll dig around for the info…