The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
April 2001

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

to run from jsp code

Posted by Sriram on June 22, 2001 at 11:09 AM

Hi ,
Try this code it works fine.


try
{
Runtime rt = Runtime.getRuntime();
rt.exec("cmd /c \"C:\\Test.bat\"");
}
catch(Exception e) {out.println(e); }


Cheers,
Sriram.



Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us