aspose file tools*
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
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: 1050

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: 3775

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: 1050

yes
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3775

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: 36486
    
  16
. . . 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
Why Do We Need a Console Class?
Display
Program for Console
Want to extend Console.
Classes for printing into console