• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What is a Console class

 
Vishal Hegde
Ranch Hand
Posts: 1077
Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
whats a console class?is it like suporting command prompt
 
Vijitha Kumara
Bartender
Posts: 3914
9
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you are talking about the Console class?
 
Vishal Hegde
Ranch Hand
Posts: 1077
Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes
 
Vijitha Kumara
Bartender
Posts: 3914
9
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Quoting from the API:
Methods to access the character-based console device, if any, associated with the current Java virtual machine....
If the virtual machine is started from an interactive command line without redirecting the standard input and output streams then its console will exist and will typically be connected to the keyboard and display from which the virtual machine was launched.If the virtual machine is started automatically, for example by a background job scheduler, then it will typically not have a console.

 
Campbell Ritchie
Sheriff
Pie
Posts: 49793
69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
. . . which means inter alia, if you start a JVM with javaw and try to get a java.io.Console and use it, you suffer a NullPointerException.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic