LinuxQuestions.org
Register a domain and help support LQ
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 03-14-2003, 12:18 PM   #1
evian
Member
 
Registered: Mar 2003
Posts: 126

Rep: Reputation: 15
setting PATH permanently


Hello,

I just installed Linux and i love it. I need to set up java and I have gotten it so that I can manually set the PATH, CLASSPATH, JAVA_HOME, etc, variables. But this is getting kind of annoying seeing as I have to do it every times I open an Xterm. Is there a configuration file that i can edit so that this will be set permanently? If so where do I find it and what do I change?

Thanks,
 
Old 03-14-2003, 12:22 PM   #2
rshaw
Senior Member
 
Registered: Apr 2001
Location: Perry, Iowa
Distribution: Mepis , Debian
Posts: 2,694

Rep: Reputation: 45
it's name varies from distro to distro, look in you home directory for .bashrc or similar
 
Old 03-14-2003, 12:28 PM   #3
Q*Bert
Member
 
Registered: Feb 2003
Location: Birmingham, UK
Distribution: Redhat 8.0, Immunix 7.0 a few others
Posts: 222

Rep: Reputation: 30
Hey, you've learnt a really important lesson about how shells use variables - before I tell you how to do it permanently, try this:

set the path in an Xterm, and type java --version to confirm it. Then launch another Xterm from that one. Notice the child shell inherits the Java classpath from the parent? This is fundamental to how shells work in Unix like systems.

Aneeway, add the following to the file /etc/profile

export JAVA_HOME="/usr/j2sdkx.x.xx/bin"
PATH="$PATH:/usr/j2sdkx.x.xx/bin"

and logout then login again.
 
Old 03-14-2003, 12:29 PM   #4
Crashed_Again
Senior Member
 
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503

Rep: Reputation: 57
Nevermind. Already posted above what I just said. Sorry.

Last edited by Crashed_Again; 03-14-2003 at 12:30 PM.
 
  


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
Can't permanently change path SuperRunt Linux - Newbie 11 02-03-2005 12:59 AM
edit value of PATH permanently rsumbeling Linux - General 2 12-13-2004 11:57 AM
permanently adding to the path hyphenage Linux - General 12 07-16-2003 02:14 AM
How to set path permanently for a particular user Sifvion Slackware 14 10-16-2002 12:02 PM
How to set PATH permanently chandhru Linux - Newbie 3 09-24-2002 01:43 AM


All times are GMT -5. The time now is 11:42 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration