peter.murray.rust peter.murray.rust - 1 month ago 16
Java Question

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).

Answer

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.