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