Sun Java installation issues

Glenn Holmer gholmer at ameritech.net
Thu Oct 9 10:23:52 UTC 2008


On Tue, 2008-10-07 at 13:29 -0300, Derek Broughton wrote:
> >> update-java-alternatives
> > 
> > No. That won't fix 'java -version' and /etc/alternatives. That's why I
> > use galternatives to modify.
> 
> It's what I've always used.  It _has_ to set up /etc/alternatives

/etc/alternatives is the product of a diseased mind.

1) download self-extracting file from Sun
2) extract in /usr/lib (or wherever you think appropriate)
3) create symlink e.g. java -> jdk1.6.0_10/
4) create whatever.sh in /etc/profile.d containing:
export PATH=/usr/lib/java/bin:$PATH

Bypasses the evil /etc/alternatives, although you have to set up the
browser plugin manually as described earlier.

To upgrade, just repeat steps one and two, then delete and recreate the
symlink.  In fact, you can easily automate changing the symlink with a
script if you want to have multiple versions on the machine.

Having said all that, it ought to be way easier for the average person
to upgrade Java on a Linux box...

-- 
"After the vintage season came the aftermath - and Cenbe."
Glenn Holmer  (Q-Link: ShadowM)  http://www.lyonlabs.org





More information about the ubuntu-users mailing list