Setting PATH - Vanishes

Hi ,

I new to solaris. I want to set path variable . Eg: JAVA_HOME.

When i do this,

#JAVA_HOME=/usr/jdk/jdk1.6
#export JAVA_HOME
#echo $JAVA_HOME
/usr/jdk/jdk1.6

Then its ok. When i toggle to bourne shell or if i log off or restart.

then JAVA_HOME is echoed blank.

How to set this permanently. In windows i used to set it permanently. Please help out.

Regards
Guru

Add the the variable in the .profile file in home dir.

 
JAVA_HOME=/usr/jdk/jdk1.6
export JAVA_HOME

Hi

Now set my path successfully. Even i was able to see it after restart. BTW. I was not able to see any file called .profile in my home directory. Its all empty. Then i went to /etc/profile and added. Its working fine.

Anyhow is it a right way ?.

Regards
Guru

yes, that also correct. Anyhow u can find the file based on ur shell type.

It is OK if you want this JAVA_HOME path for all users. If you want to configure for the particular user add it in your shell profile (.bashrc or .kshrc file)

 
# echo $SHELL

To know your shell