LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Setting Java path for root (https://www.linuxquestions.org/questions/linux-general-1/setting-java-path-for-root-16343/)

adcripps 03-15-2002 12:10 PM

Setting Java path for root
 
I've got a java installer script which needs to be run as root.

My normal user can run java (as I edited the .bashrc with the path)

Does root have such a similar setting, because when I run my java app as root, I get an error that java could not be found.

Adam

Mara 03-16-2002 01:49 AM

You set java for root exactly as for a normal user.

adcripps 03-16-2002 03:07 AM

where will i find the .bashrc file for root? In root dir?
Adam

zmedico 03-16-2002 02:36 PM

java path
 
If you want to put java in root's PATH permanently, the /root/.bashrc is a good place to do it.

Dont forget to make sure permissions are set properly: "chmod u+x /root/.bashrc"

You can also set the PATH each time it is needed, just do "export PATH=$PATH:$JAVA_PATH"
where $JAVA_PATH refers to your java's bin directory

you may want to read the bash scripting HOWTO at http://www.linuxdoc.org


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