How to configure Sun Java runtime as default

How do I configure Sun Java runtime to be the default. I’m trying to get rxtxSerial working and I think the problem might be that OpenJDK is my default…

Not sure why this isn’t working:
sudo update-alternatives --config java
sudo: update-alternatives: command not found

Thanks

i would suggest you use YaST to first remove the OpenJDK and then
install SunJava…

most folks that do that then have a java which works as expected…


DenverD (Linux Counter 282315)
CAVEAT: http://is.gd/bpoMD
posted via NNTP w/TBird 2.0.0.23 | KDE 3.5.7 | openSUSE 10.3
2.6.22.19-0.4-default SMP i686
AMD Athlon 1 GB RAM | GeForce FX 5500 | ASRock K8Upgrade-760GX |
CMedia 9761 AC’97 Audio

YaST shows Sun Java is already installed.

I got update-alternatives --config java to work.
When I run

sudo update-alternatives --config java

it fails.

But when I run

sudo -s
update-alternatives --config java

it works

Any idea why the first form doesn’t work?

It will work if you write it as:

sudo /usr/sbin/update-alternatives --config java

(/usr/sbin is not on a normal user’s PATH.)

Thank you. What’s the openSUSE recommended way to eliminate having to prepend /usr/sbin? I’d like to just be able to type sudo command rather than sudo /usr/sbin/command.

sudo -i blahblah

Thank you!