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 |
You set java for root exactly as for a normal user.
|
where will i find the .bashrc file for root? In root dir?
Adam |
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. |