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 found that use Netbeans to run the program like:System.out.print("abc"); won't output anything, unless a "\n" is encounted. Any string begin with "a" will be buffered. Is that a bug? Or I don't know something?
Looks like core issue.
cxy007, what means 'current' version ? 3.6 or 4.0 ? it works for me in build 200407220815 provide more info and reopen, thanks.
I mean version 3.6 I posted this issue a long time ago. I don't know there is new version now.
thanks cxy007, then I'll reassign to old terminalemulator because the output window is totally rewritten for NB 4.0 maybe this can be issue for terminalemulator but nobody maintains it these days
The core team has not been responsible for terminal emulator for long time, so reassigne all opened issues to responsible person.
This appears to be a more generic issue in the terminal emulator; output (via System.out stream) is line-buffered (and even flushing the stream does not help). Given the code (snippet; wrap into a "main class" to run): System.out.println("Go"); System.out.print("Foo"); System.out.flush(); try { Thread.sleep(10000L); } catch (Exception e) {} System.out.println(); System.out.println("Bar"); "Go" will be printed immediately Then there will be a 10-second delay, after which both "Foo" and "Bar" will be printed Excepted result is that "Go" and "Foo" are printed immediately, with "Bar" being printed after the 10-second delay. I can reproduce this with NetBeans 5.5, on both Linux and WinXP. It looks very much like Issue 18508 is actually the same as this one.
If this is still happening in 5.5 then it can't possibly be the terminalemulator. It's likely to be in the newer output2 module. Even before output2 the problem is not so much in the terminalemulator component as in the original output module which uses delays and timers in several places.
this is actually ant issue. The current output module (in 6.0, partly also in 5.5) can process partial lines, however the ant script that pushes the content to the output window, always waits for the newline to arrive. duplicate of #56341 *** This issue has been marked as a duplicate of 56341 ***