[R] how do I tell configure where to find Java? [Broadcast]

Logan Lewis lkderedhat at proxc.net
Tue Oct 3 22:10:43 CEST 2006


Andy,

On Tuesday 03 October 2006 3:30 pm, Liaw, Andy wrote:
> Before I do that, I would need to remove the gcj stuff that are in
> /usr/bin. If I know how to remove gcj, I'd gladly do that.  However, for
> the particular version of the OS, the entire GCC seems to be bundled into
> one rpm, and I could not remove just the gcj component.  Neither do I wish
> to mess with files that are part of some RPMs--- in my experience that's
> invitation for trouble later.

The Red Hat way of dealing with different packages providing the same binaries 
is "alternatives".  You will see a bunch of links in /etc/alternatives, and 
the command /usr/sbin/alternatives allows you to switch between options that 
provide the same binaries.  The trouble is that the Sun JDK package does not 
interface into this system, and doesn't show up as an option when you 
execute /usr/sbin/alternatives --config java.  

I'm fairly confident you can manually add the JDK as an option (somebody out 
there must've written it up).  This would probably be the most correct way of 
doing it within the context of RH's utilities.  You can probably also just 
remove gcj's links (I haven't tested this, so be careful) and make sure that 
the Sun Java binaries are in your path.

For my home system, I just set my path to have the /usr/java/... path come 
first.

Logan



More information about the R-help mailing list