Article View: borland.public.jbuilder.java.api
Article #2298Runtime.exec()
From: Alec B
Date: Sat, 24 Mar 2001 01:07
Date: Sat, 24 Mar 2001 01:07
17 lines
1636 bytes
1636 bytes
Dumb question probably, but I'm trying to use Runtime.exec(String) to have a
have app kick off a batch file.
I get no errors from it, but nothing happens. I do get an io error if I
change the file to some non-existant name, as I would expect.
Is this not the right method to use to load an external app, or am I using
it incorrectly?
Here's a code snippet:
Runtime rt = Runtime.getRuntime();
try{rt.exec("c:\\mydir\\mybat.bat");}
catch(IOException ioe){System.out.println("Error: " + ioe);}
TIA
Alec B
Technical Details
Message-ID:
<6rSu6.5122$ue1.465014@newsread2.prod.itd.earthlink.net>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!news.tele.dk!209.50.235.254!europa.netcrusader.net!207.172.3.44!feed2.news.rcn.net!rcn!newsfeed1.earthlink.net!newsfeed.earthlink.net!newsmaster1.prod.itd.earthlink.net!newsread2.prod.itd.earthlink.net.POSTED!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1089d0,230279b643792adc,start X-Google-Attributes: gid1089d0,public X-Google-ArrivalTime: 2001-03-23 17:09:23 PST Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!news.tele.dk!209.50.235.254!europa.netcrusader.net!207.172.3.44!feed2.news.rcn.net!rcn!newsfeed1.earthlink.net!newsfeed.earthlink.net!newsmaster1.prod.itd.earthlink.net!newsread2.prod.itd.earthlink.net.POSTED!not-for-mail From: "Alec B" <ab3001_2000@yahoo.com> Newsgroups: borland.public.jbuilder.java.api Subject: Runtime.exec() Lines: 20 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2919.6600 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 Message-ID: <6rSu6.5122$ue1.465014@newsread2.prod.itd.earthlink.net> Date: Sat, 24 Mar 2001 01:07:14 GMT NNTP-Posting-Host: 206.40.46.50 X-Complaints-To: abuse@earthlink.net X-Trace: newsread2.prod.itd.earthlink.net 985396034 206.40.46.50 (Fri, 23 Mar 2001 17:07:14 PST) NNTP-Posting-Date: Fri, 23 Mar 2001 17:07:14 PST Organization: EarthLink Inc. -- http://www.EarthLink.net