Yes I just verified it. All I did was change from String to String[]
and it worked. I guess I could look at the exec() source to see how
the too are different.
Thanks,
Navin
What you'll find is that the single-string version of exec() creates
a StringTokenizer around your String parameter. That tokenizer uses
white space characters as delimiters. Therefore, it will break your
command line at each space, tab, new line, return or form feed. It's
not good. And Sun also points out in the Javadocs that
StringTokenizer is a legacy class that shouldn't be used.
I learned the hard way that it's *always* best to place each portion
of your command line into a separate cell of a String array. I also
found on Windows that it works best when a parameter refers to a path
with spaces if you quote it. Our Macs are much friendlier in this
area. :-)