[Cialug] JAVA version woes.

Nathan C. Smith smith at ipmvs.com
Wed Dec 7 08:43:10 CST 2005


Looks like it does.  apparently not all do?

Is this a "better" way or just a way of accomodating both javas should one
want to do that?

-----Original Message-----
From: Tom Pohl [mailto:tom at tcpconsulting.com] 
Sent: Wednesday, December 07, 2005 8:35 AM
To: Central Iowa Linux Users Group
Subject: Re: [Cialug] JAVA version woes.


Does CenoOS use alternatives?


In fedora core, you need to do something like this:
alternatives --install /usr/bin/java java /usr/java/j2sdk1.4.2_09/bin/java
301
alternatives --install /usr/bin/javac javac
/usr/java/j2sdk1.4.2_09/bin/javac 301


-Tom


On Dec 7, 2005, at 8:31 AM, Jerry Heiselman wrote:


you need to add /usr/java/j2sdk1.4.2_09 to your path.

In csh or tsch type: setenv PATH $PATH:/usr/java/j2sdk1.4.2_09/bin
In sh, ksh, or bash type: export PATH=$PATH:/usr/java/j2sdk1.4.2_09/bin

You probably want to add those statements to your .profile or .login file
too. 

The alternative that may work better is to put a link in /usr/bin for java.
To do that type: ln -s /usr/java/j2sdk1.4.2_09/bin/java /usr/bin/java.

If you have a csh-based shell, then you will need to type in: rehash 
once you have done that.


On 12/7/05, Nathan C. Smith <smith at ipmvs.com> wrote:

So I'm trying to install the community edition of Scalix on Centos 4.2.
After I installed Redhat-derived Centos 4.2 (everything) I removed the jcc
or whatever the gcc compatible java stuff is called.  Now if I say: 
whereis java
java: /etc/java /usr/lib/java /usr/share/java

But

java -version
-bash: java: command not found

Hmm.  So Java lives at: /usr/java/j2sdk1.4.2_09

Seems to me I need to get it into the path somehow right?  Can anyone throw 
me a clue on how to proceed so that when I type java -version from anywhere
I get

java version "1.4.2_09"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_09-b05)
Java HotSpot(TM) Client VM (build 1.4.2_09-b05, mixed mode)

I'm not sure if a path change or a symlink is what I need...

-Nate
_______________________________________________
Cialug mailing list
Cialug at cialug.org 
http://cialug.org/mailman/listinfo/cialug



_______________________________________________
Cialug mailing list
Cialug at cialug.org
http://cialug.org/mailman/listinfo/cialug


More information about the Cialug mailing list