• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

setting PATH variable and linux

 
david allen
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to set the PATH variable. I issue the following command
PATH=$PATH/usr/java/j2sdk1.4.2/bin
export PATH
The PATH is then set but if I close down the terminal window the changes are gone.
Please help as I have almost reached breakiing point
david
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24208
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Note that this is not a Java question at all; this probably belongs in "General Computing."
Anyway, you have to put the shell commands you're showing us into a file that is executed when your shell starts. Precisely -which- file to use depends on which shell you're using, and also to a lesser extent on the details of how your system is set up. Your best bet is to put those lines into a file in your home directory named .bashrc (note that the name starts with a period, making it an "invisible" file.)
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving this to the Linux forum...
[ July 25, 2003: Message edited by: Dirk Schreckmann ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic