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? Thanks, ergo_sum |
Create
/etc/profile.d/java.sh Code:
#!/bin/bash Cheers, Tink |
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 JAVA_HOME=/usr/java/j2re1.4.2_01 export JAVA_HOME aswell. |
Can I do this anywhere in /etc/profile?
ergo_sum |
Don't use/modify /etc/profile
It might get overwritten with your next upgrade. The /etc/profile.d/java.sh method is the better approach ;) as it keeps things modular as well... Cheers, Tink |
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.
|
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? Thanks, ergo_sum |
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 :} Cheers, Tink |
Done!
Thanks very much. ergo_sum |
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 03:04 AM. |