Subscribe

RSS Feed (xml)

Powered By

Skin Design:
Free Blogger Skins

Powered by Blogger

Thursday, February 28, 2008

Sample Code On Process Execution

import java.io.IOException;

/**
* Created on Feb 21, 2003
*/
// To start a process(Spawn a process within the jvm)
public class ProcessExec
{
public static void main( String[] argv )
{
String command = "c:\\winnt\\explorer.exe";
try
{
Process process = Runtime.getRuntime().exec( command );
}
catch ( IOException ioex )
{
ioex.printStackTrace();
}
}
}

No comments:

Post a Comment