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.
The output window (Ctrl+4) is not displaying stdout and stderr in the order of calls to System.out.println() and System.err.println(). System.{out,err}.flush() has no effect on the displayed content. Test program: public class Main { public static void main(String[] args) { for(int i=0; i<2; i++) System.out.println("stdout"); for(int i=0; i<2; i++) System.err.println("stderr"); } } Content displayed in the output window: run: stdout stderr stdout stderr BUILD SUCCESSFUL (total time: 0 seconds) Expected content of the output window: run: stdout stdout stderr stderr BUILD SUCCESSFUL (total time: 0 seconds) Suggested solution: Netbeans should use a single Linux file to read the program's outputs. In C/C++ world, this would mean that read(1, stdout_buf, size) and read(2, stderr_buf, size) read from the same underlying file. Linux man pages: dup2. ---- Related bugs: bug 202545 - not a duplicate of this bug because it targets the BlueJ component and because it is old