Click to See Complete Forum and Search --> : Caffine, Lattes, and Java


Dark Ninja
09-13-2001, 10:03 PM
Okay - Just reinstalled my Mandrake system and I can't seem to get Java working. I downloaded the SDK package (the rpm version) and followed the instructions to install it. That worked. But, now, when I try to use "sh program.sh", I am told that the 'sh' command doesn't exist. I am also told that the 'java' command doesn't exist.

What happened? Everything seemed to go alright. Any help that can be provided would be excellent.

Thank you,

Dark Ninja

error27
09-14-2001, 12:16 AM
Normally "sh" is just a symlinc to /bin/bash you can recreate it. I don't know why it would get deleted.

as root type "updatedb" then type "locate java"

Dark Ninja
09-14-2001, 07:05 AM
Yup. It's definitely installed on my system. (Exists in the /usr/jre****) folder.

Do I need to create some sort of symbolic link to it? That's the only thing I can think of that may help.

Dark Ninja

error27
09-14-2001, 09:18 AM
no. just find where the bin/ dir is in the java stuff and add taht to your $PATH in your ~/.bash_profile

$PATH=$PATH:/path/to/java/bin/
export $PATH

or you can do it system wide in your /etc/profile

Dark Ninja
09-14-2001, 09:34 AM
Hmmmmm...okay, I tried to add the /usr/java/jrexxxxxxx/bin to my $PATH following the steps you said. When I type:

$PATH=$PATH:/usr/java/jrexxxxxxx/bin

I get the error: bash: /bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/X11R6/bin:/usr/games=/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/X11R6/bin:/usr/games:/usr/java/jre1.3.1_01/bin/: No such file or directory

I noticed that the /usr/java/jrexxxxx has already been added.

I guess I did forget to mention what exactly I am trying to do. I'm attempting to run LimeWire which requires the Java classes. However, when I type 'sh runlime.sh' I get an error because it can't access the java command that is in its shell script. When I just type 'java' under the command prompt, I am told that it is an invalid command. I'm going to keep trying to get this to work, but any other help from anybody would be much appreciated.

Dark Ninja

bdg1983
09-14-2001, 11:27 AM
The format is as so

PATH="$PATH:/bin:/usr/bin:/scripts:./"

No $ in the first PATH and double quotes " at the beginning and end.

Linux_N00bie
09-14-2001, 12:16 PM
yes, i had the same problem... just add your usr/bin/java_jdk1.3.1/bin (or whatever it is) into your path in your profile... and then type the 'source profile' or some command like that (still not very familiar with linux) to update it and try the java -version or some other commands and it should work... :)

Unruly
09-14-2001, 12:36 PM
Originally posted by Dark Ninja:
<STRONG>Okay - Just reinstalled my Mandrake system and I can't seem to get Java working. I downloaded the SDK package (the rpm version) and followed the instructions to install it. That worked. But, now, when I try to use "sh program.sh", I am told that the 'sh' command doesn't exist. I am also told that the 'java' command doesn't exist.

What happened? Everything seemed to go alright. Any help that can be provided would be excellent.

Thank you,

Dark Ninja</STRONG>


try symlinking the java binary to /usr/bin/java and running it then...

error27
09-14-2001, 12:58 PM
mdwatts is right. i screwed up.

Dark Ninja
09-14-2001, 03:32 PM
Hmmm...already is a symlink. (I tried that from a post I found earlier on this board.) However, the PATH thing DID work...kind of. It works until I close the terminal window. Is there any way to make it stick around permanently?

Dark Ninja

error27
09-14-2001, 03:38 PM
put it into your ~/.bash_profile so that it executes everytime you open a new terminal.