LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   A question about .profile in Solaris Sparc (https://www.linuxquestions.org/questions/linux-software-2/a-question-about-profile-in-solaris-sparc-863500/)

thomas2004ch 02-18-2011 05:31 AM

A question about .profile in Solaris Sparc
 
Hi,

I have questions about .profile in Solaris Sparc. I am not sure if here is the right place. Anyway I try. :-)

I used to use the LINUX. And at the user home there is a file called .bash_profile. I can add following codes in this file:
Code:

JAVA_HOME=/usr/local/jdk1.5
export JAVA_HOME

And then after re-login I can pring out the JAVA_HOME as follow:

echo $JAVA_HOME.


But now I have a machine with Solaris Sparc installed. Under the user home there is file .profile and local.profile.

I do the same as by LINUX. But as I type "echo $JAVA_HOME", it shows nothing.

The local.profile looks as follow:

Code:

-bash-3.00$ cat local.profile
#
# Copyright (c) 2001 by Sun Microsystems, Inc.
# All rights reserved.
#
# ident "@(#)local.profile      1.10    01/06/23 SMI"
stty istrip

JAVA_HOME=/opt/talanx/jdk1.6.0_20

export JAVA_HOME

PATH=/usr/bin:/usr/ucb:/etc:.

export PATH

Strangely when I type "echo $PATH", It shows
Code:

/usr/local/bin:/usr/bin:
Why?


Regards

Thomas

bathory 02-18-2011 06:30 AM

Hi,

You should use .profile to set your env variables.

Regards

thomas2004ch 02-18-2011 06:34 AM

Quote:

Originally Posted by bathory (Post 4262570)
Hi,

You should use .profile to set your env variables.

Regards

Yes, you are right.

Many thanks!


All times are GMT -5. The time now is 02:46 AM.