"java" command

OK...now I've gone through all this trouble to install java from the bin files it came in. I have installed both j2sdk and j2re. I installed these programs because LimeWire claims to need them to operate. Now, I go to run lime wire and limewire says I can run Limewire by the command "sh runLime.sh" or by the command "java -jar RunLime.jar" in the directory I installed LimeWire into. Only problem seems to be that even though I have installed Java RE, the "java" command doesnt seem to exist.

Plz Help...I need p2p, I dont want to have to keep windoze just so I can use kazaa, and with the exception of lime wire there arent any other p2p clients i like very much...

Ensure the "java" command is in your PATH variable.

echo $PATH at the command line. If the "java" command does not reside in at least one of the directories listed then it is not in your PATH variable.

The solution is to either 1) set the relevant directory in your PATH variable via your .profile file or /etc/PATH if you wish to make it system-wide or 2) enter the full path to the "java" command when you run it.

Can you explain a little better as to how i do that...still teetering on the edge fo newbie...

If you're not sure where the "java" command is execute the following at the command line (open up a terminal window to get to command line if you are running some sort of X windowing software):

# whereis java

If the location of "java" is not found execute:

# find / -name java -exec file {} \;

You should be able to locate an executable called "java" and this command will show you the full path to it.

Change directory to your home directory:

# cd

Edit your .profile file using vi or another text editor to add the path name that was returned by the find command above to the 'PATH=' statement in your .profile.

e.g. PATH=$PATH:[ path statements already present]:/path/to/java

So an example path statement would be:

PATH=$PATH:/usr/sbin:/usr/local/bin:/opt/someapp

Save the profile and login again.

Execute:

#whereis java

And the full path to the java command should be shown. Now attempt to execute the command that failed previously.

I already know the path to the java executable file...I got that part going...now...

if i type in ./usr/java/*blahblah*/bin/java -jar RunLime.jar

will it run the program...or should it I mean...

kthnx