LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-09-2002, 09:44 PM   #1
phishead
Member
 
Registered: Jan 2002
Location: Dayton, Ohio
Distribution: Gentoo
Posts: 43

Rep: Reputation: 15
Things not staying in PATH?


I installed java to run a program and put it in the PATH.. program ran fine. When I went back later it said java command not found..

I put it in the path again.. same thing, it worked once then stopped.

Im putting it the path with the following command:

export PATH=/home/name/j2re1.3.1/bin:$PATH

any ideas?
 
Old 01-09-2002, 11:01 PM   #2
neo77777
LQ Addict
 
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Rep: Reputation: 56
you should add the export line you wrote to /etc/profile file at the end, so every user who is loged into the system will have the same chunk of it. If you'd like to keep it only to a particular user add the java bin directory to $PATH in .bash_profile file in the users home directory. Don't forget to run
source /etc/bashprofile
or
source .bash_profile
to make changes happen immediatly.
 
Old 01-10-2002, 03:39 PM   #3
phishead
Member
 
Registered: Jan 2002
Location: Dayton, Ohio
Distribution: Gentoo
Posts: 43

Original Poster
Rep: Reputation: 15
Im having a problem getting it in my etc/profile file.. And in my .bash_profile.

What code would I put in?
 
Old 01-10-2002, 04:42 PM   #4
neo77777
LQ Addict
 
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Rep: Reputation: 56
as root open for editing /etc/profile file
i am not using GUI editors so I can't tell you wich one is better, if you work from console and not famiiar with emacs, vi or any other console editors, I found the easiest to use for a newbie is pico
in console as root type
pico /etc/profile

It will open the file in console navigate by using arrow keys, go to the end and type

export PATH=/home/name/j2re1.3.1/bin:$PATH
save the file ( in pico hit ctrl-O and then ctrl-X to save and quit)
then from the console as root run

source /etc/profile
as a non-root run the same command to make changes for non-root user who currently logged in (yourself)
it will make the PATH permanent for you as root and for you as yourself on the system
 
Old 01-10-2002, 06:16 PM   #5
phishead
Member
 
Registered: Jan 2002
Location: Dayton, Ohio
Distribution: Gentoo
Posts: 43

Original Poster
Rep: Reputation: 15
Got it working, thanks
 
Old 01-10-2002, 07:10 PM   #6
neo77777
LQ Addict
 
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Rep: Reputation: 56
No problems
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Suse: confused on many things, why is installing things so hard? blackflare Linux - Newbie 11 10-16-2007 04:35 AM
Staying with debian Woody? alexxxis Debian 3 06-14-2005 04:41 PM
Staying online between logins une Mandriva 3 04-14-2005 03:06 PM
hostname not staying!! samills70 Red Hat 6 06-30-2004 04:52 AM
Staying awake houseathon General 20 10-01-2003 01:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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