Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 99718 invoked from network); 15 Jun 2005 16:24:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 15 Jun 2005 16:24:07 -0000 Received: (qmail 91199 invoked by uid 500); 15 Jun 2005 16:23:59 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 91142 invoked by uid 500); 15 Jun 2005 16:23:59 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 91118 invoked by uid 99); 15 Jun 2005 16:23:58 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from outbound1.z-ptx-11.fr.sopragroup.com (HELO outbound1.sopragroup.com) (81.80.239.198) by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 15 Jun 2005 09:23:57 -0700 Received: by outbound1.sopragroup.com (8.12.10/8.12.10/outbound-A02) with ESMTP id j5FFf4N4021265 for ; Wed, 15 Jun 2005 17:41:05 +0200 X-MimeOLE: Produced By Microsoft Exchange V6.0.6603.0 Content-Class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: [Commons Launcher] - Read a line from System.in is blocking Date: Wed, 15 Jun 2005 17:41:04 +0200 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [Commons Launcher] - Read a line from System.in is blocking Thread-Index: AcVxwLwV1miIqTvFSJ6DqA52wVHnvA== From: "Kherzi Samir" To: X-OriginalArrivalTime: 15 Jun 2005 15:45:36.0000 (UTC) FILETIME=[4595D000:01C571C1] X-Scanned-By: MIMEDefang 2.38 X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi, I've notice a bug (or somthing that looks like) using Commons Launcher = on Unix (HP-UX 11, Sun Solaris 8, Linux) with a JRE 1.4.2. I use in my code a method that = wait for a user input from System.in: ---------------------------------------------------------------------- // read a line on the console public static String console() throws IOException { InputStreamReader isr =3D new InputStreamReader(System.in); BufferedReader br =3D new BufferedReader(isr); String line =3D br.readLine(); return line; } ---------------------------------------------------------------------- When I call consecutively this method many times, the prompt seems to wait infinitly: String myString =3D null; System.out.print("1 - Enter something: "); myString =3D console(); System.out.print("2 - Enter something: "); myString =3D console(); System.out.print("3 - Enter something: "); myString =3D console(); To unlock the console() return call, I have to type on the << return >> = keyboard key many times to take my input from the command line. This never happens when I execute my code outside a Commons Launcher = script. This never happens too on my Windows (Windows 2000, jre 1.4.2). Please find at this URL the complete test: > http://samir.kherzi.free.fr/TestCommonsLauncher.tar < You will find in this package the following files that will help to reproduce the problem: -------------------------------------------------------------------- ant.jar : the ant jar ant-launcher.jar : the ant launcher jar commons-launcher.jar : the commons launcher jar xercesImpl.jar : the xerces jar xml-apis.jar : the xml api jar LauncherBootstrap.class : the class from commons launcher.properties : the properties to find ant jars launcher.xml : the ant project TestCommonsLauncher.java : the source code of console() TestCommonsLauncher.class : the class of console compile.sh : the script to compile (unix) compile.bat : the script to compile (win32) go.sh : script shell to launch classicaly the test = (unix) go_usingCL.sh : script shell to launch the test using = Commons Launcher (unix) go.bat : script shell to launch classicaly the test = (win32) go_usingCL.bat : script shell to launch the test using = Commons Launcher (win32) -------------------------------------------------------------------- Best regards, Samir KHERZI. --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org