This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Java in General and the fly likes What is a Console class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "What is a Console class" Watch "What is a Console class" New topic
Author

What is a Console class

Vishal Hegde
Ranch Hand

Joined: Aug 01, 2009
Posts: 1055

whats a console class?is it like suporting command prompt


http://www.lifesbizzare.blogspot.com || OCJP:81%
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3816

I think you are talking about the Console class?


SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
Vishal Hegde
Ranch Hand

Joined: Aug 01, 2009
Posts: 1055

yes
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3816

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

Joined: Oct 13, 2005
Posts: 37951
    
  22
. . . 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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What is a Console class
 
Similar Threads
Display
Why Do We Need a Console Class?
Classes for printing into console
Program for Console
Want to extend Console.