This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes setting PATH variable and linux Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "setting PATH variable and linux" Watch "setting PATH variable and linux" New topic
Author

setting PATH variable and linux

david allen
Ranch Hand

Joined: Sep 27, 2002
Posts: 185
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

Joined: Jul 08, 2003
Posts: 24183
    
  34

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.)


[Jess in Action][AskingGoodQuestions]
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
Moving this to the Linux forum...
[ July 25, 2003: Message edited by: Dirk Schreckmann ]

[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: setting PATH variable and linux
 
Similar Threads
Class varible in linux
ODBC error
linux jdk configration
JAVA_HOME
UnsatisfiedLinkError on JBoss calling a JNI native method