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.
If you input something into the output window and some output comes in between, your input gets messed up completely. This really breaks lots of interactive tests when running within NetBeans. Here is a small test program: -------------- import java.io.*; public class Main { public static void main(String[] args) throws IOException { OutputThread outputThread = new OutputThread(); outputThread.start(); InputStreamReader streamReader = new InputStreamReader(System.in); BufferedReader stdIn = new BufferedReader(streamReader); String input = stdIn.readLine(); outputThread.running = false; System.out.println("input=\"" + input + "\""); System.exit(0); } private static class OutputThread extends Thread { public boolean running = true; public void run() { while (running) { System.out.println("output"); try { Thread.sleep(100); } catch (InterruptedException ex) { } } } } } -------------- Start it and type slowly any string you want (with several characters). After pressing Enter take a look how your input ends up at the program. In most of the cases the input will be reversed or randomized.
I just installed NetBeans-6.7 and the bug is still there.
System terminals have the same behavior. The Output window was designed this way, it would probably have to have two modes - one terminal-like and one with a separate input field like it had in the past.
core-main/rev/8e79faf3c5b4 System terminals do mix input and output characters, but input string is not reversed. Fixed.
Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/8e79faf3c5b4 User: Jaroslav Havlin <jhavlin@netbeans.org> Log: #142721 - Input messed up by output