Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


  Search this Thread
Old 03-14-2003, 11:18 AM   #1
Registered: Mar 2003
Posts: 126

Rep: Reputation: 15
setting PATH permanently


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?

Old 03-14-2003, 11:22 AM   #2
Senior Member
Registered: Apr 2001
Location: Perry, Iowa
Distribution: Mepis , Debian
Posts: 2,692

Rep: Reputation: 45
it's name varies from distro to distro, look in you home directory for .bashrc or similar
Old 03-14-2003, 11:28 AM   #3
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"

and logout then login again.
Old 03-14-2003, 11:29 AM   #4
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 11:30 AM.


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

All times are GMT -5. The time now is 07:26 PM.

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