dcsimg
How to use Runtime.exec(String s) in Linux Operating System.
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Harish_B
Posted On:   Tuesday, May 15, 2001 06:49 AM

What changes should be done to a java program coded for windows platform to make it run on Linux regarding the Runtime.exec() method.
I am not getting any errors as such,but
it is not executing the command.

Re: How to use Runtime.exec(String s) in Linux Operating System.

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.

About | Sitemap | Contact