This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
I am using 4.1beta with Java 1.5 Here is the code: import java.util.Scanner; public class Comparison { /** * @param args the command line arguments */ public static void main(String[] args) { Scanner input = new Scanner(System.in); int number1; int number2; System.out.print("Enter first integer: "); number1 = input.nextInt(); }// end main }// end class Comparison _____________________________________________________ Here is the output: init: deps-jar: compile: run: Exception in thread "main" java.util.NoSuchElementException at java.util.Scanner.throwFor(Scanner.java:817) at java.util.Scanner.next(Scanner.java:1431) at java.util.Scanner.nextInt(Scanner.java:2040) at java.util.Scanner.nextInt(Scanner.java:2000) at Comparison.main(Comparison.java:25) Enter first integer: Java Result: 1 BUILD SUCCESSFUL (total time: 0 seconds) The IDE is not letting me respond to the input request of "Enter first integer:" and then of course it is generating an exception due to no input reaponse. Is there something I need to do to tell the output to allow me to respond before proceeding??? Thanks
reassigning to ant.
This appears to be a duplicate of issue #47708. It was not possible to pass command-line input to a running program in NB 4.1 Beta. It works in recent 4.1 builds. *** This issue has been marked as a duplicate of 47708 ***