File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes IDEs, Version Control and other tools and the fly likes eclipse and System.console() 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 » Engineering » IDEs, Version Control and other tools
Bookmark "eclipse and System.console()" Watch "eclipse and System.console()" New topic
Author

eclipse and System.console()

Ra Carter
Ranch Hand

Joined: Jul 30, 2005
Posts: 96
I am using eclipse 3.2.2 IDE and I notice there is System.console().readLine() in Java 1.6. This works if I run my program from the command line but a null reference exception is thrown when running the application with eclipse.

I don't actually know what my question is now but I don't like this...
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15951
    
  19

I seem to recall that there's an option to assign the input console to an Eclipse pane when running under the debugger, but I don't remember what it is just at the moment.

Whatever it was, it worked way back on Java 1.4 or earlier. I haven't yet moved up to Java 6.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: eclipse and System.console()
 
Similar Threads
getch() and getche() both are not working using JNI in Eclipse built in console widow
How can I build a console application in Eclipse when Eclipse doesn't support it properly? (afaik)
NPE from K&B example SCJP6
System.console() Problem
NPE in Eclipse, but not in commandline?