Return-Path: Delivered-To: apmail-jakarta-ant-user-archive@apache.org Received: (qmail 57671 invoked from network); 12 Nov 2001 15:51:56 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 12 Nov 2001 15:51:56 -0000 Received: (qmail 5762 invoked by uid 97); 12 Nov 2001 15:51:02 -0000 Delivered-To: qmlist-jakarta-archive-ant-user@jakarta.apache.org Received: (qmail 5728 invoked by uid 97); 12 Nov 2001 15:51:01 -0000 Mailing-List: contact ant-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list ant-user@jakarta.apache.org Received: (qmail 5675 invoked from network); 12 Nov 2001 15:51:00 -0000 Message-ID: <20011112155100.21238.qmail@web13407.mail.yahoo.com> Date: Mon, 12 Nov 2001 07:51:00 -0800 (PST) From: Diane Holt Subject: Re: Prompt To: Ant Users List , pperevalov@cyber-asp.com In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N --- Paul Perevalov wrote: > I do all my development on windows, for unix "con" should be replaced on > "/dev/stdin". You can hardcode this :) or just add a little code snippet > to make this target platform independent (I didn't test it on unix, so > probably you have to test it a little bit): > > //get os name > var os = project.getProperty("os.name"); > var console; > > //select appropriate input > if(os.charAt(0) == 'W' || os.charAt(0) == 'w'){ > console = "con"; > }else{ > console = "/dev/stdin"; > } > > //get standart input stream > var stdin = new BufferedReader(new InputStreamReader(new > FileInputStream(console))); > > Just add this code to the target and remove duplicate line where new > BufferedReader is created. If you're running Ant 1.4, you can use the task to set a *nix versus Win* property -- eg: Diane ===== (holtdl@yahoo.com) __________________________________________________ Do You Yahoo!? Find a job, post your resume. http://careers.yahoo.com -- To unsubscribe, e-mail: For additional commands, e-mail: