Forums Register Login

Cannot get instance of Console

+Pie Number of slices to send: Send
my system is not providing me with an instance of console ... (Console s = System.console();).. what to do?
+Pie Number of slices to send: Send
you are probably running your program in an IDE. try running your program in commandline and you will definitely get an instance of Console. for more information refer javadocs for Console class at http://docs.oracle.com/javase/6/docs/api/java/io/Console.html
+Pie Number of slices to send: Send
o yes i was .. thankyou!
1
+Pie Number of slices to send: Send
In extension to what gurpeet said. IDE's generally uses javaw.exe (which doesnt have a console associated) and not java.exe( which have a associated console)
And when my army is complete, I will rule the world! But, for now, I'm going to be happy with this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 734 times.
Similar Threads
Display
Classes for printing into console
visual age use
Passing String array as argument to main() method
Applet not running in Internet Explorer
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 15, 2024 23:29:21.