Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 142721 - Input messed up by output
Input messed up by output
Product: platform
Classification: Unclassified
Component: Output Window
All All
: P4 with 1 vote (vote)
: 7.1
Assigned To: Jaroslav Havlin
Depends on:
  Show dependency treegraph
Reported: 2008-08-03 20:43 UTC by rost
Modified: 2011-10-14 15:02 UTC (History)
0 users

See Also:
Issue Type: DEFECT


Note You need to log in before you can comment on or make changes to this bug.
Description rost 2008-08-03 20:43:26 UTC
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:

public class Main {

    public static void main(String[] args) throws IOException {
        OutputThread outputThread = new OutputThread();
        InputStreamReader streamReader = new InputStreamReader(;
        BufferedReader stdIn = new BufferedReader(streamReader);
        String input = stdIn.readLine();
        outputThread.running = false;
        System.out.println("input=\"" + input + "\"");

    private static class OutputThread extends Thread {

        public boolean running = true;

        public void run() {
            while (running) {
                try {
                } 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.
Comment 1 rost 2009-07-19 21:27:13 UTC
I just installed NetBeans-6.7 and the bug is still there.
Comment 2 Martin Entlicher 2011-02-01 10:28:32 UTC
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.
Comment 3 Jaroslav Havlin 2011-10-12 08:40:29 UTC

System terminals do mix input and output characters, but input string is not reversed. Fixed.
Comment 4 Quality Engineering 2011-10-14 15:02:23 UTC
Integrated into 'main-golden'
User: Jaroslav Havlin <>
Log: #142721 - Input messed up by output

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo