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.
When executing the following code, this is the output ONLY in the NetBeans IDE: import java.util.Scanner; class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); System.out.print("Blahdy blah: " + "blah."); sc.next(); } } Output: Blahdy blah: blah.Blahdy blah: blah. The statement before the call to Scanner#next() is repeated. This only happens when running the code in the NetBeans IDE. Furthermore, the statement is only repeated when it includes that colon. Take it out, and you will notice that it is not repeated.
Sorry, I couldn't reproduce. There's only appropriate output. Product Version: NetBeans IDE Dev (Build 200909071948) Java: 1.5.0_20; Java HotSpot(TM) Client VM 1.5.0_20-141 System: Mac OS X version 10.5.8 running on i386; MacRoman; en_US (nb) Could you please provide further details? NB build, jdk, operating system.
I am using NB 6.7.1 java version "1.6.0_14" Java(TM) SE Runtime Environment (build 1.6.0_14-b08) Java HotSpot(TM) Client VM (build 14.0-b16, mixed mode, sharing) Windows XP Professional v2002 SP3
Posted a video of this happening on YouTube: http://www.youtube.com/watch?v=iUHXOm1SHPQ
I found that this can also be replicated with just this code: class Main { public static void main(String[] args) { // Apparently anything after the colon that is not a // space or blank character will cause this statement to repeat. System.out.print("Blahdy blah: a"); } } This does not happen when using the println method.
Reproduced. Product Version: NetBeans IDE 6.7.1 (Build 200907230233) Java: 1.5.0_20; Java HotSpot(TM) Client VM 1.5.0_20-141 System: Mac OS X version 10.5.8 running on i386; MacRoman; en_US (nb) Reassigning.
Seems as a bug in the output window or java Ant loger
*** This issue has been marked as a duplicate of 168274 ***
Sorry wrong tab (issue), reopening.
Works for me in 6.8 (current) builds. Reassigning to the output win.
*** This issue has been marked as a duplicate of 167279 ***