• Post Reply Bookmark Topic Watch Topic
  • New Topic

What is a Console class  RSS feed

 
Vishal Hegde
Ranch Hand
Posts: 1078
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
Saloon Keeper
Posts: 3999
42
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: 1078
Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes
 
Vijitha Kumara
Saloon Keeper
Posts: 3999
42
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
Marshal
Posts: 55793
164
  • 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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!