Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!border3.nntp.dca.giganews.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.earthlink.com!news.earthlink.com.POSTED!not-for-mail NNTP-Posting-Date: Sat, 25 Jun 2011 15:38:49 -0500 Date: Sat, 25 Jun 2011 13:38:48 -0700 From: Patricia Shanahan User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 MIME-Version: 1.0 Newsgroups: comp.lang.java.programmer Subject: Re: runtime.exec problems References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Lines: 20 X-Usenet-Provider: http://www.giganews.com NNTP-Posting-Host: 70.230.196.78 X-Trace: sv3-1Z0zBKqF38G/gjoJ7mp9LOg+Yh6gCsIHrru149kXVEaPKq9meouIIOVeQozNH9BOnndZnkcodjy9VSx!A0NhTpLYSHFDbVf8YhVNlLZ5KDYA7PgD9dbQhgI2OwnxZ4//ajQA4YMppepqrYOTOaqifFB+3uq+!PpxA8S2aWrsBkRrqe2zyK0mBT88TwbxSoomy5WWr2n8V/A== X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 2027 Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:5670 On 6/25/2011 10:58 AM, Memo wrote: > I can't get runtime.exec to execute a program in Java. I am trying to > execute a bat file. I read that in order to run bat files as opposed > to .exe files the runtime command has to include "cmd /c start" before > the name of the bat file. I have run bat files successfully this way > before. > > The command that I am running works when typed from the command line. > It is: > > z:/n4/pkg/MrServers/MrVista/Simu/StartSimEnv.bat -AutoStart > GOLD_256x512.dat ... The next thing to do is to write a simple .bat file that just echos its parameters. Substitute it for StartSimEvent.bat, and see what is really getting passed. Work at that until it is getting exactly the parameters you want to pass to StartSimEvent.bat. Patricia