The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
January 2001



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.


Running .bat file thru Java file

Posted by Girish B on January 01, 2001 at 8:59 AM

I want to run .bat file thru java programme.
I can run .bat file thru java programe statically.
But I want to pass paramter to it dynamically.

Right now i am using command as
Runtime.getRuntime().exec("test.bat p1 p2 p3");
I want to pass parameters p1, p2 and p3 as dynamically to it.
Please tell me any other method is there to pass the parameter dynamically.


Sponsored Links

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