[CentOS] environment-modules

xiaoyunpeng xiaoyunpeng at nrchpc.ac.cn
Sat Dec 26 03:07:22 UTC 2009

I think you should give the user a path list of javas you've installed. More
step on, a script with a "sun-java" or "openjdk" as input for switching the
java type would be better.

On Sat, Dec 26, 2009 at 12:41 AM, Les Mikesell <lesmikesell at gmail.com>wrote:

> m.roth at 5-cent.us wrote:
> >> m.roth at 5-cent.us wrote:
> >>> We've got a developer here who needs to use both java and openjdk. I
> was
> >>> giving her sudo for alternatives, but my manager would prefer that I
> >>> look into environment-modules. I've installed it, and I see it comes
> with
> >>> configurations for cvs and info... but nothing for java, and the man
> >>> pages doesn't seem to offer info on creating one.
> >>>
> >>> Does anyone have a pointer to a howto, or maybe even a sample one?
> >> install openjdk uia standard centos 5.x rpms, install Sun Java to
> >> /usr/java/jdk-whatever via the Sun tarball.
> >
> > Already did that (btw, Sun doesn't give you a tarball, they give you a
> > self-extracting .bin).
> >> if you put /usr/java/jdk-whatever/bin first in the path, you'll be using
> >> the Sun java.  if you take it out of the path, you will be using the
> >> default distribution openjdk.
> >
> > I'm trying to provide a simple method for switching between the two, and
> I
> > don't have any guarantee that someone *other* than this developer, who
> > seems knowledgeable, will have to do the same thing.
> >
> > I reiterate: does anyone have any examples for a modulefile for java?
> You don't need to switch.  You can have as many java versions as you want
> installed.  Just export JAVA_HOME pointing to the one you want and either
> put
> the location of the binary you want first in PATH or give the full path in
> the
> command to start up.  Anyone who works with java will already know this.
>  It is
>  rpm that has a problem dealing with multiple versions of things running
> concurrently.
> --
>    Les Mikesell
>     lesmikesell at gmail.com
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.centos.org/pipermail/centos/attachments/20091226/4f59acf6/attachment.html>

More information about the CentOS mailing list