This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Java in General and the fly likes console class is not working Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "console class is not working" Watch "console class is not working" New topic
Author

console class is not working

raghu ramn
Greenhorn

Joined: Feb 20, 2011
Posts: 2

Tom Reilly
Rancher

Joined: Jun 01, 2010
Posts: 618
Are you running your application from an IDE? From the documention
System.console will only exist If the virtual machine is started from an interactive command line without redirecting the standard input and output streams
This means that System.console will not exist when your application is started by another process, which typical IDEs do.
 
Consider Paul's rocket mass heater.
 
subject: console class is not working