Re: [suse-sles-e] Installing a new JDK in SLES10SP1 AMD64

From: Leo Eraly (leo_at_unstable.be)
Date: Mon Oct 29 2007 - 10:17:40 CET


From: Leo Eraly <leo@unstable.be>
Date: Mon, 29 Oct 2007 10:17:40 +0100
Message-Id: <1193649460.7739.7.camel@camper.unstable.be>
Subject: Re: [suse-sles-e] Installing a new JDK in SLES10SP1 AMD64

On Sun, 2007-10-28 at 05:19 +0100, Rainer Duffner wrote:
> Hi,
>
> I want to make SUN's JDK15 (latest) the system-wide default JDK (also
> because IBM's JDK throws an exception upon running the installer).
>
> But I'm a bit confused how to actually do that.
>

The update-alternatives program is used to determine the default
jre/jdk/java.

This program maintains symbolic links in /etc/alternatives (for various
commands) which point to the specific version/command that is actually
used when calling a command.

e.g

 # update-alternatives --display java
java - status is manual.
 link currently points to /usr/lib/jvm/jre-1.5.0-sun/bin/java

This means , when I execute java I'm actually
executing /usr/lib/jvm/jre-1.5.0-sun/bin/java

 # java -version
java version "1.5.0_13"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_13-b05)
Java HotSpot(TM) Client VM (build 1.5.0_13-b05, mixed mode)

With

 # update-alternatives --config java

There are 3 programs which provide `java'.

  Selection Command
-----------------------------------------------
* 1 /usr/lib/jvm/jre-1.5.0-sun/bin/java
      2 /usr/lib/jvm/jre-1.4.2-gcj/bin/java
 + 3 /usr/lib/jvm/jre-1.6.0.u3-sun/bin/java

Enter to keep the default[*], or type selection number:

I have the option to change this symlink and make another java binary
actually used when I execute the 'java' command

Kind regards,

Leo

-- 
Leo Eraly <leo@unstable.be>
---------------------------------------------------------------------
To unsubscribe, e-mail: suse-sles-e-unsubscribe@suse.com
For additional commands, e-mail: suse-sles-e-help@suse.com


This archive was generated by hypermail 2.1.7 : Mon Nov 05 2007 - 20:11:41 CET