Subject: | |
From: | |
Reply To: | |
Date: | Sun, 23 Mar 2014 11:00:50 +0900 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
On Saturday 22 March 2014 06:44:19 Joseph Areeda wrote:
> Hi All,
>
> My immediate problem is that the utility "jar" is not in my path and
> update-alternatives --config java does not set up the symbolic link. I
> currently have /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java selected.
> This is as installed.
>
> In my reading I can see a way to set up a new alternative by installing
> all the utilities as slaves.
>
> Is there a way to just add jar and a few other utilities to the existing
> alternative?
I believe you will need to use the alternatives command directly. It works
like this:
alternatives --install [link] [name] [path to version] [priority as int]
So that would be something like:
alternatives --install /usr/bin/jar jar /opt/ibm/ibm-java-x86_64/bin/jar 2
alternatives --set jar /opt/ibm/ibm-java-x86_64/bin/jar
Switching between kits can be annoying since it can involve changing a lot of
paths in more than just one place (IBM vs Oracle runtime profiling tools, for
example), so I would recommend putting a helper script somewhere to do the
tedious bits for you. Remember, also, that alternatives doesn't have to point
to an executable directly, but could be to the JVM version's bin directory
through which you access the other commands (in other words, including the
linked directory tree in path instead of the individual commands themselves).
I've pasted a slightly more in-depth example of basic use here:
http://zxq9.com/archives/934
|
|
|