LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 05-01-2005, 06:20 AM   #1
simon_w
Member
 
Registered: Jun 2004
Location: UK
Distribution: Debian Etch
Posts: 71

Rep: Reputation: 15
Hiding password in Java command line program


When entering input to a Java command line program, is it possible/easy to mask the input with asterisks?
 
Old 05-02-2005, 01:29 AM   #2
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,506

Rep: Reputation: 360Reputation: 360Reputation: 360Reputation: 360
This is usually not possible with pure Java, but achievable with some native code depending on platforms.
See Jline for an implementation:
http://jline.sourceforge.net/#reading_password
 
Old 05-02-2005, 06:01 AM   #3
simon_w
Member
 
Registered: Jun 2004
Location: UK
Distribution: Debian Etch
Posts: 71

Original Poster
Rep: Reputation: 15
I found this on the Java website. I looks a bit OTT/messy for the simple program I'm writing, so I'll give it a miss this time.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can you specift password on SSH command line? The_JinJ Linux - Newbie 4 07-26-2005 05:55 AM
Command Line Password Check jedediah Linux - Security 4 12-09-2004 03:01 PM
going to root without password thru command line amanjsingh Linux - Newbie 6 03-29-2004 11:38 PM
Command line arguments to java program Majjj Programming 3 10-23-2003 05:48 AM
Viewing program messages when program isn't run from command line? Locura Linux - Software 1 09-27-2003 08:19 AM


All times are GMT -5. The time now is 03:48 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration