Or have written a command-line program once in our lives. There are
nooks and crannies of Java which have unexpected behavior; this isn't
one of them, unless you're a C/C++ programmer
Or shellscript - $(dirname $0) FTW! - or perl, or python, or ...
I agree entirely that this is not a difficult feature of java. I do often
wonder about it, though. On the one hand, i like it, because the program's
name is not usually at all interesting (and not even all that meaningful a
concept in java, where you invoke 'java' and pass a classname, which you
know statically inside main, as an argument), and the traditional unix way
means you effectively have a 1-based array to deal with, which is ugly. On
the other hand, it's a difference to every other language on the planet.
Oh well, not exactly a big deal.
tom