Article View: borland.public.jbuilder.java.api
Article #2297Re: Exectuting external app
From: Calvin R. Smith
Date: Fri, 23 Mar 2001 16:15
Date: Fri, 23 Mar 2001 16:15
30 lines
2249 bytes
2249 bytes
This I know. What I want is to launch a program and NOT capture it's output. "John McGrath [TeamB]" <ng-b@JPMcGrath.net> wrote in message news:MPG.1524c8bd4b2eac3e98a095@forums.borland.com... > On Thu, 22 Mar 2001 13:46:21 -0700, Calvin R. Smith wrote: > > > How can I execute an external program (java.exe) and have > > it open it's own window and display the print statements > > in it's own window? > > The Java Runtime exec() methods pipe the output from the subprocess > back to the JVM. You can get input streams to read the output from > the Process object returned by exec(), using the getErrorStream() and > getInputStream() methods. > > This is actually something you should do whenever you use the Runtime > exec method, if there is any possibility that the process will produce > any output. If you do not and the buffers for one of the pipes fills > up, your subprocess will hang. And to read the output from both of the > streams simultaneously, you will need to spawn threads. > > -- > Regards, > > John McGrath [TeamB] > > --------------------------------------------------- > Before sending me e-mail, please read: > http://www.JPMcGrath.net/newsgroups/e-mail.html
Technical Details
Message-ID:
<3abb770b$2_1@dnews>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!feeds.vnews.net!nntp.cifnet.net!cyclone.bc.net!sunqbc.risq.qc.ca!news1.ebone.net!news.ebone.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!t-online.de!news1.dtag.de!news.gwi-ag.com!dnews!207.201.104.90References:
<3aba6504_2@dnews> <MPG.1524c8bd4b2eac3e98a095@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1089d0,dc52a4c87b02d0a0 X-Google-Attributes: gid1089d0,public X-Google-ArrivalTime: 2001-03-23 11:36:08 PST Reply-To: "Calvin R. Smith" <calvinrsmith@hotmail.com> From: "Calvin R. Smith" <calvinrsmith@hotmail.com> Newsgroups: borland.public.jbuilder.java.api References: <3aba6504_2@dnews> <MPG.1524c8bd4b2eac3e98a095@forums.borland.com> Subject: Re: Exectuting external app Date: Fri, 23 Mar 2001 09:15:35 -0700 Lines: 32 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 NNTP-Posting-Host: 207.201.104.90 Message-ID: <3abb770b$2_1@dnews> X-Trace: 23 Mar 2001 08:17:15 -0800, 207.201.104.90 Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!feeds.vnews.net!nntp.cifnet.net!cyclone.bc.net!sunqbc.risq.qc.ca!news1.ebone.net!news.ebone.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!t-online.de!news1.dtag.de!news.gwi-ag.com!dnews!207.201.104.90