Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I get input from System.in (Java) in Netbeans?

I have a small Java test app in Netbeans where the main() class reads input from System.in. How can I open a window into which I can type input? (I am using NB 6.7.1 on Windows 7).

like image 773
peter.murray.rust Avatar asked Dec 10 '22 18:12

peter.murray.rust


1 Answers

It may not be obvious but in Netbeans the Output tab at the bottom also takes input if your main thread is waiting for input. Just type under the last output line and hit enter. In other words, the Output tab is the same as a console window.

like image 157
jercra Avatar answered Dec 12 '22 07:12

jercra