Mailinglist Archive: opensuse (2441 mails)

< Previous Next >
Re: [SLE] switching between two installed Java versions (9.3)
  • From: John D Lamb <J.D.Lamb@xxxxxxxxxxxxxx>
  • Date: Fri, 03 Jun 2005 07:44:52 +0100
  • Message-id: <429FFC64.3040205@xxxxxxxxxxxxxx>
Glenn Holmer wrote:
> What is up with the insane tangle of symlinks that makes up jpackage??!
> I remember how easy it used to be just to change the link /usr/lib/java
> and everything would be good. I don't find any documentation on how to
> do this anymore.
>
> What is the "canonical" way to switch back and forth between 1.4 and 1.5
> in SUSE 9.3? surely not by editing all the symlinks
> in /etc/alternatives, or by uninstalling and reinstalling one or the
> other every time you want to switch?
>

Perhaps the easist way would be to open a konsole and run

$ export PATH=/usr/lib/jvm/java-1.4.2-sun/bin/:$PATH

each time you specifically want to use java 1.4.2. You could even put
this in a shell script. Alternatively, instead of

$ java app

use

$ /usr/lib/jvm/java-1.4.2-sun/bin/java app

and you'll get the 1.4.2 version.

Compiling should be more straightforward if you use the -target flag.

--
JDL

< Previous Next >
References