🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #607

Re: Keyboard Input?

#607
From: Vander
Date: Thu, 17 Mar 2005 08:16
32 lines
2143 bytes
Many thanks both of you, very interesting hints!
In particular the BeanShell approach seems promising. Another question 
that arises is if somebody tries to mimic an operating system prompt in 
a JConsole, could you possibly redirect system console output of other 
programs (e.g. service commands) into the Java application that runs the 
JConsole?


John McGrath [TeamB] wrote:

>On 3/16/2005 at 4:22:12 AM, Vander wrote:
>
>  
>
>>Perhaps a bit off the swing topic, but I wonder if it is possible to
>>obtain direct keyboard character/signal input from the console.
>>System.in only reads lines of text and echoes all characters. For a
>>commandline utility I need to perform password input, so to echo only
>>"*" instead of the text. - Can somebody know a solution or can give me
>>directions? Thanks!
>>    
>>
>
>There is nothing in Java that allows this level of control over console
>input.  To do this with console input, you would need to use some sort of
>native library.  An alternative approach would be to use a GUI console
>window, such as the JConsole class that comes with BeanShell:
>
>   http://www.beanshell.org/
>
>  
>
Technical Details
Message-ID: <42393cb4@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <4237faa1@newsgroups.borland.com> <xn0dztrm97vxxax007@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 111d45,4ed6eade21edc20e
X-Google-Attributes: gid111d45,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Thu, 17 Mar 2005 09:16:25 +0100
From: Vander <874505@gmx.de>
User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.5) Gecko/20031007
X-Accept-Language: de,en
MIME-Version: 1.0
Newsgroups: borland.public.jbuilder.java.swing
Subject: Re: Keyboard Input?
References: <4237faa1@newsgroups.borland.com> <xn0dztrm97vxxax007@newsgroups.borland.com>
In-Reply-To: <xn0dztrm97vxxax007@newsgroups.borland.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 62.226.31.215
Message-ID: <42393cb4@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1111047348 62.226.31.215 (17 Mar 2005 00:15:48 -0800)
Lines: 33
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail