LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-17-2003, 08:03 PM   #1
peteABK
Member
 
Registered: May 2003
Location: Canada
Distribution: Fedora 13
Posts: 49

Rep: Reputation: 15
PATH and JAVA_HOME


Quick question about the above variables,

when ever I set them through the shell

eg.

export PATH="$PATH:/usr/java/ja<version>/bin"

and

export JAVA_HOME="/usr/java/ja<version>"

they only last for the duration of the shell. when ever I quit and reload the shell these variables are erased. I am trying to export them as the root user, but I can't figure out why they don't last, any help is greatly appreciated.
 
Old 10-17-2003, 08:18 PM   #2
micxz
Senior Member
 
Registered: Oct 2002
Location: CA
Distribution: openSuSE, Cent OS, Slackware
Posts: 1,131

Rep: Reputation: 75
In your home directory, just add them to the appropriate .profile or rc file for your shell. e.g. .profile .bashrc .bash_profile
 
Old 10-19-2003, 11:43 AM   #3
peteABK
Member
 
Registered: May 2003
Location: Canada
Distribution: Fedora 13
Posts: 49

Original Poster
Rep: Reputation: 15
If I do this in the root directory will it aply to all users?
 
Old 10-19-2003, 05:20 PM   #4
micxz
Senior Member
 
Registered: Oct 2002
Location: CA
Distribution: openSuSE, Cent OS, Slackware
Posts: 1,131

Rep: Reputation: 75
No.

in /etc if you want it system wide. But usually this is not needed because you may alter the environment of the users shell that your logged into. So why make it system wide when you only need it for one app?

Hint: . or dot files in a users home directory are configuration setting and evironment setting for that users shell and programs. Not the whole system!
 
Old 10-19-2003, 05:30 PM   #5
megaspaz
Senior Member
 
Registered: Nov 2002
Location: Silly Con Valley
Distribution: Red Hat 7.3, Red Hat 9.0
Posts: 2,054

Rep: Reputation: 46
setting your java path system wide:

http://www.linuxquestions.org/questi...highlight=java
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
setting JAVA_HOME gauravbagga Linux - Newbie 2 03-04-2005 10:17 PM
JAVA_HOME Variable yea420 Linux - Software 6 08-29-2004 07:37 PM
JAVA_HOME path not set for all users tantric Linux - Software 5 03-29-2004 02:25 PM
$JAVA_HOME and $PATH magnum818 Linux - Software 2 09-30-2003 11:05 PM
JAVA_HOME and tomcat mbbender Linux - Software 5 07-07-2003 09:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:16 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration