Click to See Complete Forum and Search --> : Trouble setting PATH


sajchurchey
06-15-2003, 01:00 PM
I am using RH 7.3, and I have tried adding the following lines towards the end of /etc/profile and /etc/bashrc in order to allow access to the java SDK binaries:

export PATH=$PATH;/usr/java/j2sdk1.4.1_03/bin

For some reason when i bring up a terminal, the PATH doesn't work, and it displays the following error msg:


bash: /usr/java/j2sdk1.4.1_03/bin/: is a directory


which I thought was the entire point of the PATH variable.

Also, what should I set CLASSPATH equal to in order for other java compilers to have access to the SUN Java API?

deathadder
06-15-2003, 01:07 PM
try addin the path to ~/.bashrc instead it should work

bwkaz
06-15-2003, 01:39 PM
Actually, don't bother changing what file it's in, that shouldn't matter (too much, at least not for now). ;)

Instead of separating PATH elements with a semicolon, separate them with a colon. DOS uses semicolons, Linux shells do not. :)

What's happening now is, you're setting PATH to $PATH, then the semicolon tells bash to start another command. This command is consisting of just that directory (that you're trying to add to your PATH), so it gives you the "is a directory" message.

sajchurchey
06-15-2003, 02:15 PM
Yeah,

I forgot whether to use semi-colons or colons so I just guessed.

Thanks for the clarification, makes perfect sense now.