-   Linux - Newbie (
-   -   please tell me if my path statement is correct on RH 7.3 (

ergo_sum 11-11-2003 04:31 PM

please tell me if my path statement is correct on RH 7.3
Hello All:

I'm using RH 7.3 w/ kde on the desktop. I downloaded java a while back and never put in a path statement. Java was downloaded to /usr, so I'm thinking that the path statement goes:

export PATH=$PATH://usr/java/j2re1.4.2_01/bin

Is this correct? And do I append that to my .bashrc file? I'd like this to be on everybody's path statement. How do I do that?



Tinkster 11-11-2003 04:41 PM


export PATH=$PATH:/usr/java/j2re1.4.2_01/bin
export JAVA_HOME=/usr/java/j2re1.4.2_01

chmod go+r /etc/profile.d/


Looking_Lost 11-11-2003 04:45 PM

If that's where your jre was installed then that's what you'd put, put it in /etc/profile for everyone to have it in their path

might want to add to /etc/profile


export JAVA_HOME


ergo_sum 11-11-2003 04:56 PM

Can I do this anywhere in /etc/profile?


Tinkster 11-11-2003 04:59 PM

Don't use/modify /etc/profile

It might get overwritten with your next
upgrade. The /etc/profile.d/
method is the better approach ;)
as it keeps things modular as well...


Looking_Lost 11-11-2003 05:03 PM

Just about, although never thought of Tinkster's way before which would keep everything nice and clean and orderly, infact I think I prefer that way now.

ergo_sum 11-11-2003 05:04 PM

Also, how do I edit the file from the command line?
I can open the file after 'su' and 'cat', but I can't edit it. How do I gain access to edit?



Tinkster 11-11-2003 05:12 PM

Whichever editor you like mate ...

Pico, vi, emacs, mc, sed :}

You can if you need to also use
a graphical tool like kwrite or gvim,
and just chmod it from a graphical
file manager, but I think in the long
run console will be a) the faster solution,
and b) particularly useful if you screw-up
X11 some day :}


ergo_sum 11-11-2003 05:43 PM


Thanks very much.


Doomhammer 12-13-2003 12:41 AM

Yeah, the shell is the power of linux. Im always in the shell, im the kind of guy who wants to know HOW. ive been using linux for a year now, and someday im gonna be a guru!! :)

All times are GMT -5. The time now is 09:16 AM.