• Post Reply Bookmark Topic Watch Topic
  • New Topic

Console class  RSS feed

 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the purpose of Console class?
can anyone tell me in brief?
Thanks in advance ...
 
Marshal
Posts: 56600
172
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is supposed to give you access to keyboard input from the shell/terminal. In particular it allows you to enter your password and have it appear as *********.

Unfortunately most Java® applications are packaged as .jars and run with javaws or javaw rather than the java tool, in which case System.console() returns null, so any attempt to use a Console throws a null exception. I am sure others will disagree with me but in my not‑at‑all‑humble opinion, this is the use for Console:-

It hasn't got one.
 
Campbell Ritchie
Marshal
Posts: 56600
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You do mean this Console class, I presume?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!