> > I have j2sdk for linux. I am not able to execute javac, java and
> > others by their names. To execute them, I need to do ./javac to
[quoted text clipped - 7 lines]
>
> export JAVA_HOME PATH
>> > I have j2sdk for linux. I am not able to execute javac, java and
>> > others by their names. To execute them, I need to do ./javac to
[quoted text clipped - 11 lines]
> Also, try adding "." to your path. That will allow you to run progs in
> your current directory.
NO! BAD MOJO! Never add the current directory indicator to your search path.

Signature
Darryl L. Pierce <mcpierce@myrealbox.com>
Visit the Infobahn Offramp - <http://mypage.org/mcpierce>
"What do you care what other people think, Mr. Feynman?"
Gregory A. Swarthout - 08 Mar 2004 23:20 GMT
> >> > I have j2sdk for linux. I am not able to execute javac, java and
> >> > others by their names. To execute them, I need to do ./javac to
[quoted text clipped - 13 lines]
>
> NO! BAD MOJO! Never add the current directory indicator to your search path.
Why?
Jon A. Cruz - 09 Mar 2004 07:12 GMT
>>>Also, try adding "." to your path. That will allow you to run progs in
>>>your current directory.
>>
>>NO! BAD MOJO! Never add the current directory indicator to your search path.
>
> Why?
Because it's a bad thing to do.
:-)
It can hide things that are happening. It can make situations harder to
reproduce. Lot's of other things. Usually it's only Windows systems that
have "." on the executable search path.
drdoubt - 10 Mar 2004 18:10 GMT
> >>>Also, try adding "." to your path. That will allow you to run progs in
> >>>your current directory.
[quoted text clipped - 10 lines]
> reproduce. Lot's of other things. Usually it's only Windows systems that
> have "." on the executable search path.
My job was done, thanks to Darryl L. Pierce. But I did not get why one
should not add the current directory indicator.
regards,
vz.
Darryl L. Pierce - 10 Mar 2004 17:25 GMT
>> > Also, try adding "." to your path. That will allow you to run progs in
>> > your current directory.
[quoted text clipped - 3 lines]
>
> Why?
1. It's a Windows/DOS practice and not a recommended thing to do in *nix.
2. It opens security holes in your system in that it allows a script to
execute a file in the current directory without you *expressly* telling it
to do so.
3. Common practice on *nix is to put executables in directories named
"*/bin"; any other directory should have the path explicitly stated
4. Executing arbitrary binaries in the current directory can hide problems
on your system.

Signature
Darryl L. Pierce <mcpierce@myrealbox.com>
Visit the Infobahn Offramp - <http://mypage.org/mcpierce>
"What do you care what other people think, Mr. Feynman?"
Collin VanDyck - 09 Mar 2004 21:03 GMT
> NO! BAD MOJO! Never add the current directory indicator to your search path.
I've never had any problem with it, personally, but it does seem to be a
common problem amongst *nix greenhorns. Good advice :)