SuSE 11.2 default Java version?

Right now, I have both IcedTea and Sun’s version of Java installed. When I type

java -version

I get:


java version "1.6.0_18"
OpenJDK Runtime Environment (IcedTea6 1.8.1) (suse-1.1.3-i386)
OpenJDK Client VM (build 14.0-b16, mixed mode)

I want my java apps to use Sun’s version of java and not IcedTea. I was told that most distros have a tool that allows you to choose which version of Java is the default. Does SuSE 11.2 have this tool? If so, where? How can I tell the system to use Sun java as the default?

I usually remove the IcedTea version if I install the Sun version

That’s good to know. I was wondering if I could do that.

It may depend on other apps you have that may require IcedTea, If you can’t remove it, you should only use one of the browser plugins

But when some apps need them, better do not deinstall (as caf4926 already said).
There is a tool to tell which one to use by those that are indifferent and I used it for (more or less) the same reason.

But I forgot the name. I come back when I remember.

Before I removed the IcedTea version, I had Yast check the dependencies and it said all was ok, so I went ahead and removed it.

For my browser plugin, I have been using Sun’s java so I’m pretty sure it will be ok. I just started one of my java apps and it started right up just fine.

So now, when I check the java version, I get:


java -version
java version "1.6.0_21"
Java(TM) SE Runtime Environment (build 1.6.0_21-b06)
Java HotSpot(TM) Client VM (build 17.0-b16, mixed mode)

DO post the tool to tell which one to use by those that are indifferent though. You never know if it might be needed in the future.

Found it. It is* update-alternatives* . Look at it’s man page. And to see the Java versions you have use

update-alternatives --list java

to begin with.

use YaST to uninstall icetea…then, try again…

if it still doesn’t pick up SUN java, reinstall it (in YaST)…


DenverD
CAVEAT: http://is.gd/bpoMD [posted via NNTP w/openSUSE 10.3]
When it comes to chocolate, resistance is futile.

Thanks guys! :smiley:
I put the command into a text file for my reference for next time.

Also to change:

update-alternatives --config java

This should give choices similar to this and allow you to select your default.

# update-alternatives --config java

There are 2 alternatives which provide `java'.

  Selection    Alternative
-----------------------------------------------
          1    /usr/lib/jvm/jre-1.6.0-sun/bin/java
*+        2    /usr/lib/jvm/jre-1.6.0-openjdk/bin/java

Press enter to keep the default[li], or type selection number:[/li]```

I found this information to be very helpful. I had both Openjdk and Sun Java installed, and I couldn’t get FireFox to use Sun Java plugin. I was having trouble getting a .jnlp to run correctly with Openjdk, but when I switched to Sun the vendor application ran flawlessly.

I don’t know which method worked, but I ran “update-alternatives --config java” and chose SunJava as my default, plus I removed Openjdk through Yast. I found I also had to add javaws to the file associations for .jnlp in Configure Desktop.

Is there no such purge commands available in SUSE as it is in Ubuntu?

On 2013-03-29 15:46, susprusty wrote:
>
> udaman;2255939 Wrote:
>> I found this information to be very helpful. I had both Openjdk and Sun
>> Java installed, and I couldn’t get FireFox to use Sun Java plugin. I
>> was having trouble getting a .jnlp to run correctly with Openjdk, but
>> when I switched to Sun the vendor application ran flawlessly.
>>
>> I don’t know which method worked, but I ran “update-alternatives
>> --config java” and chose SunJava as my default, plus I removed Openjdk
>> through Yast. I found I also had to add javaws to the file associations
>> for .jnlp in Configure Desktop.
>
> Is there no such purge commands available in SUSE as it is in Ubuntu?

You are asking in a thread that has been two years dead. Why?

11.2 no longer exists, Sun’s java has been removed from current
distributions, so anything that is in this thread can not be applied to
current releases.


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)