Posted By:
Nathan_Meyers
Posted On:
Tuesday, May 15, 2001 08:13 AM
Basically, Runtime.exec(String) is the same
as passing a command to a shell - to
command.com on a Windows machine
or to a Bourne shell on a Linux or
Unix machine. If you want a command to
work in both environments, it needs to
be something that you could execute from
a command shell in both environments -
and of course it needs to be a command
that can be found in the
PATH in both
environments.
If you need to do something different
in each environment, you can check the
os.name system property to figure
out which OS you are running.