Click to See Complete Forum and Search --> : Installing java with RedHat 7.0


benny666
04-13-2002, 08:32 AM
I downloaded java sdk 1.4 for linux installed it but when I try to run commands like
java file
javac file.java

I get message java not a command

I tried to run these commands from the bin drirectory of the sdk where these commands are but nothing happened

can someone help??

Do you know of good installation notes??

basically I want to run jsp on that mechine do I need to download a specific version of apache or configure apache before or do I make suer that java is working on that mechine first??

bdl
04-13-2002, 11:27 AM
What you'll need to do is add the /whatever/path/to/java/bin to your $PATH variable. Let's say you installed java to '/usr/local/java' and the bin directory is at '/usr/local/java/bin'. You add this to your PATH by sticking a single line in your ~/.bash_profile like so:


# Java PATH
export PATH="$PATH:/usr/local/java/bin"


Once you've edited the file and added this line, logout and log back in. It's very i mportant to keep the $PATH variable in that line. Otherwise, your original system-set PATH will be lost and you won't be able to do much. Test what you've done by looking at your PATH directive in the shell:

prompt$ echo $PATH

That should do it. This is the same type of procedure you'll follow anytime you install software that has it's own 'bin' directory, or if you just want to add something to your PATH.

PATH HowTo (http://tldp.org/HOWTO/mini/Path.html)

Luck!