🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #562

Re: Runtime - external program visibility

#562
From: Alexey N. Solofnenko
Date: Sat, 05 Mar 2005 00:18
29 lines
2007 bytes
In Java you need to pump (read in a separate thread) stdout and stderr, 
because the child process will block if the streams buffer is full.

- Alexey.

Oliver wrote:
> Hello,
> 
> i use the getRuntime method to start an external program out of 
> my Java app: Runtime.getRuntime().exec(cmd);
> where cmd is an array of String
> 
> String[] cmd =
>  { "\"c:/Whatever.exe\"","/user=User","/password=XXX"};
> 
> Now the issue is that the program (Whatever.exe) starts, it
> accepts the parameters (user,password), - the / is required by
> Whatever.exe - but the window of the application Whatever.exe is
> not visible! The process is there (one can see it in the 
> taskmanager). 
> 
> In Delphi i have the possibility by using Windows.CreateProcess
>  and passing a "StartupInfo" 
> (lStartupInfo.dwFlags:= STARTF_USESHOWWINDOW;
> lStartupInfo.wShowWindow:= SW_SHOWNORMAL;) but here in Java i dont see a possibility of determining in which way the external app is being started up or determining its visibility.
> 
> kind regards
> 
> Oliver
Technical Details
Message-ID: <4228fac5@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <42243956$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: f74b3,e543362b6f52ec0b
X-Google-Attributes: gidf74b3,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Fri, 04 Mar 2005 16:18:14 -0800
From: "Alexey N. Solofnenko" <alexeys@inventigo.com>
User-Agent: Mozilla Thunderbird 1.0+ (Windows/20050301)
MIME-Version: 1.0
Newsgroups: borland.public.jbuilder.java.language
Subject: Re: Runtime - external program visibility
References: <42243956$1@newsgroups.borland.com>
In-Reply-To: <42243956$1@newsgroups.borland.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 208.200.221.5
Message-ID: <4228fac5@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1109981893 208.200.221.5 (4 Mar 2005 16:18:13 -0800)
Lines: 29
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail