From owner-freebsd-java@FreeBSD.ORG Tue Mar 3 10:23:14 2015 Return-Path: Delivered-To: freebsd-java@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BE5FF537 for ; Tue, 3 Mar 2015 10:23:14 +0000 (UTC) Received: from smarthost1.greenhost.nl (smarthost1.greenhost.nl [195.190.28.81]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7E47C2F3 for ; Tue, 3 Mar 2015 10:23:13 +0000 (UTC) Received: from smtp.greenhost.nl ([213.108.104.138]) by smarthost1.greenhost.nl with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1YSjjF-0006iG-9s; Tue, 03 Mar 2015 11:07:10 +0100 Content-Type: text/plain; charset=iso-8859-15; format=flowed; delsp=yes To: freebsd-java@freebsd.org, "Matthias Apitz" Subject: Re: read unbuffered from STDIN References: <20150227142014.GA4468@c720-r276659> <20150227150046.GA4811@c720-r276659> Date: Tue, 03 Mar 2015 11:07:04 +0100 MIME-Version: 1.0 Content-Transfer-Encoding: Quoted-Printable From: "Ronald Klop" Message-ID: In-Reply-To: <20150227150046.GA4811@c720-r276659> User-Agent: Opera Mail/1.0 (Win32) X-Authenticated-As-Hash: 398f5522cb258ce43cb679602f8cfe8b62a256d1 X-Virus-Scanned: by clamav at smarthost1.samage.net X-Spam-Level: / X-Spam-Score: -0.2 X-Spam-Status: No, score=-0.2 required=5.0 tests=ALL_TRUSTED, BAYES_50 autolearn=disabled version=3.3.2 X-Scan-Signature: 76f3589a93270604ea078d468a2051b3 X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Mar 2015 10:23:14 -0000 On Fri, 27 Feb 2015 16:00:46 +0100, Matthias Apitz = wrote: > El d=EDa Friday, February 27, 2015 a las 03:20:14PM +0100, Matthias Ap= itz = > escribi=F3: > >> This does not work in FreeBSD+eclipse and as well not when started as= >> >> $ javac reader.java >> $ java -cp . reader > > It does work when one does: > > $ stty raw ; java -cp . reader > Enter characters, 'q' to quit. > a > a > a > > Any ideas how to issue the 'stty raw' from within the java classes? > > matthias > I have never used them, but java.io.Console and java.util.Scanner might = = solve your issue. http://docs.oracle.com/javase/7/docs/api/index.html?java/util/Scanner.ht= ml http://docs.oracle.com/javase/7/docs/api/index.html?java/io/Console.html= Regards, Ronald.