LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-18-2011, 04:31 AM   #1
thomas2004ch
Member
 
Registered: Aug 2009
Posts: 539

Rep: Reputation: 33
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
 
Old 02-18-2011, 05:30 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,167
Blog Entries: 1

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
Hi,

You should use .profile to set your env variables.

Regards
 
1 members found this post helpful.
Old 02-18-2011, 05:34 AM   #3
thomas2004ch
Member
 
Registered: Aug 2009
Posts: 539

Original Poster
Rep: Reputation: 33
Quote:
Originally Posted by bathory View Post
Hi,

You should use .profile to set your env variables.

Regards
Yes, you are right.

Many thanks!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
chroot on Solaris 10 SPARC. czezz Solaris / OpenSolaris 3 09-11-2008 08:47 AM
Solaris 7 SPARC e1000g 0.o Solaris / OpenSolaris 1 12-04-2007 05:48 PM
Solaris 8.1.7 on SPARC, how I get it? saudoi Solaris / OpenSolaris 2 06-02-2005 09:39 PM
VNC 4 on Solaris 9 (Sparc) gquiring Solaris / OpenSolaris 1 10-08-2004 02:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration