SCIENTIFIC-LINUX-USERS Archives

March 2014

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Dr Andrew C Aitchison <[log in to unmask]>
Reply To:
Dr Andrew C Aitchison <[log in to unmask]>
Date:
Mon, 24 Mar 2014 07:11:13 +0000
Content-Type:
text/plain
Parts/Attachments:
text/plain (44 lines)
On Sat, 22 Mar 2014, Joseph Areeda wrote:

> On 03/22/2014 09:17 AM, Orion Poplawski wrote:
>> On 03/22/2014 07:44 AM, 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.
>> Do you have java-1.7.0-openjdk-devel installed?  That is where jar lives.
>> 
> Hi Orion,
>
> My problem is not running jar, but rather switching between different JDK's. 
> I have OpenJDK 6 and 7 and Oracle's 6 and 7 and use
>
> update-alternatives --config java
>
> to switch between them for testing.  Unfortunately I can't seem to convince 
> everybody to use my favorite JDK ;-)
>
> The problem is that the alternative setup in the RPMs is not complete.  jar, 
> javadoc, javah and jstack are the ones I use the most which are are not 
> there.
>
> What I'm wondering is if I have to build the install sets from scratch or if 
> there's a way to just slave files to existing sets?

Like Nico I'm wary of switching the default java machine-wide.

Instead of alternatives I suggest that you use either
scl-utils or environment-modules, both of which
allow you to change the default version of a command
within some (inherited) context, setting all necessary environment.

I prefer environment-modules (mostly because it updates the existing
shell rather than starting a new one with the altered state)
but Red Hat use scl-utils for some of the packages which they ship.

-- 
Dr. Andrew C. Aitchison		Computer Officer, DPMMS, Cambridge
[log in to unmask]	http://www.dpmms.cam.ac.uk/~werdna

ATOM RSS1 RSS2