Path In order for bash for find the java program it has to know where to look for it. You can list directories to be searched for programs in the PATH environment variable. Whenever you try to run a program, bash looks at this variable and searches the directories listed trying to find a match. If one is found, that program is run. You can set the PATH in either the ~/.bash_profile or /etc/profile configuration files. ~/.bash_profile is specific to your user while /etc/profile is a system wide configuration.
You need to append the directory where your java program lives on to this PATH list. Here's an example (from my system) of setting the PATH:
PATH=$PATH:$HOME/bin:/usr/java/jdk1.3.1/bin
On my system it's /usr/java/jdk1.3.1/bin. Yours will be different! You have to find the java bin directory on your system. It'll be something like /usr/java/jre1.3.1/bin but check to make sure.
To edit either /etc/profile or ~/.bash_profile just open them in a text editor and find the existing PATH= line (there probably is one) and add :/yourjavadirhere on to the end of it. Note that each entry in the PATH line is separated by a colon.
Then make sure PATH appears in an export line further on in the file. PATH may be on it's own or with other variables, it doesn't matter. eg
export PATH
Save the file. Log out, log back in, and test everything by opening a terminal and typing:
java -version
You should see the java version information. And that's it! Try to fire up LimeWire!
There have been many posts in this forum on this topic. If you have any trouble try reading some of those. Some have links to good sites with information on the PATH variable.
Last edited by twist; November 5th, 2001 at 05:20 AM.
|