LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 04-11-2004, 04:30 PM   #1
linux_dejan
Member
 
Registered: Mar 2004
Posts: 36

Rep: Reputation: 15
$PATH keeps changing?


I just installed java sdk and now i need to make it possible to call java, javac and all those commands directly by just writing them in xterm no matter in what directory you are in...

Well, i started out by editing the $PATH by adding /usr/local/j2sdk1.4.2_04/bin/ like so:

export PATH=$PATH:/usr/local/j2sdk1.4.2_04/bin/

And it works!..... UNTILL i close xterm and start a new one or jump out of root to my user account??

Why is $PATH not keeping the value i give it??

Thx!
 
Old 04-11-2004, 04:32 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
beacuse it has no where to be kept. you need to set it in a config file. e.g /etc/profile, ~/.bashrc or another similar one. each of these files will be executed each time to log in, i.e open a shell window or similar. alternatively add it to a system wide run once file, like /etc/rc.local if your distro supports it.
 
  


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
Changing path trotsky Linux - Newbie 3 09-03-2005 05:09 PM
changing the path liljhand Linux - Software 5 01-30-2005 05:37 AM
changing the java path Alwyn Linux - Newbie 4 01-24-2005 06:35 AM
Changing environment path. JMC Linux - General 1 05-04-2002 04:50 AM
changing PATH toxic53 Linux - Newbie 1 09-27-2001 01:04 AM


All times are GMT -5. The time now is 02:51 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