Yewint Ko wrote:Which command to use for setting variable?
I have the JDK installed at /usr/java/jdk1.6.0_17 and set JAVA_HOME using:
export JAVA_HOME=/usr/java/jdk1.6.0_17
Yewint Ko
Ranch Hand
Joined: Aug 02, 2009
Posts: 90
posted
0
Peter Johnson wrote:
Yewint Ko wrote:Which command to use for setting variable?
I have the JDK installed at /usr/java/jdk1.6.0_17 and set JAVA_HOME using:
export JAVA_HOME=/usr/java/jdk1.6.0_17
yes. but I can no longer use it after restarting the command prompt. The above command seems to set JAVA_HOME temporarily.
I want it to be permanent. Any other command? And I also want to know how to set PATH.
Somebody help me when you are free.
thanks
To make it permanent, edit the ~/.bashrc file, placing the export statement in there. You can do the same with PATH. Here is an example of setting PATH: