problem setting JAVA_HOME
hi, i did the following to set the java_home...
export java_home=/usr/java/j2re1.4.2_2 export PATH=$java_home/bin:$PATH HOWEVER, every time i open a new shell and type 'java'.... it says command not found. the java_home only works for the specific shell that i set it for. is there a way to make the java command a universal variable? |
i believe its because once you set it, it is only available for the time that the shell is open.. once you close it you would have to set it up again.
however, there should be a '.bashrc' file in your home folder, edit that. you will see the "PATH="... variable declared there, just add your java_home one before that, and edit the path like you did in your post, to include $java_home in the $path. |
awesome. that worked like a charm
|
Quote:
|
Quote:
export JAVA_HOME="pathtothejavadirectorium ex. /usr/java/jdkx.x.x/jre" export PATH=$JAVA_HOME/bin:$PATH I'm a rookie plz if some1 has a different opinion plz correct me. Best regards |
Either /etc/bashrc or /etc/profile is the most common place for global environment for users who might not have their own .bashrc or .bash_profile in their home directory.
|
All times are GMT -5. The time now is 07:24 PM. |