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.

Bug 108961 - Output window ignores flushes on text that doesn't end with a newline
Summary: Output window ignores flushes on text that doesn't end with a newline
Status: RESOLVED DUPLICATE of bug 56341
Alias: None
Product: platform
Classification: Unclassified
Component: Output Window (show other bugs)
Version: 5.x
Hardware: All Linux
: P1 blocker (vote)
Assignee: Milos Kleint
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-05 17:59 UTC by apb
Modified: 2008-12-22 14:59 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description apb 2007-07-05 17:59:44 UTC
Here is a bit of test code:

public class NetbeansOutputTest {
  
  public static void main(String[] args) {
    System.out.println("Starting Test.");
    System.out.println("This should print immediately.");
    System.out.print("This should print immediately too.");
    System.out.flush();
    try {
      Thread.currentThread().sleep(10000);
    } catch (Exception e) {}
    System.out.println("\nThis should print out after 10 seconds.");
    System.out.println("Finished Test.");
  }
}

The desired output (and the behavior one gets when running from the command line is:

Starting Test.
This should print immediately.
This should print immediately too.
< 10 second wait >
This should print out after 10 seconds.
Finished Test.


However, when this code is run in Netbeans the output looks like:


Starting Test.
This should print immediately.
< 10 second wait >
This should print immediately too.
This should print out after 10 seconds.
Finished Test.


It looks as if the output window is refusing to output any text that doesn't end in a newline.
This is extremely bad for a piece of code that I'm writing because it is command-line based
and it has a very long startup so we print out a "." every now and then to let the user know 
the progress is being made, however, the periods don't get printed out until the entire process
is finished (which defeats the point of this pacification text). The code behaves properly in
every other context that I've tried it (ie, not in Netbeans).
Comment 1 Milos Kleint 2007-07-09 07:44:29 UTC
duplicate of #56341, the output window itself is capable of processing non-complete line, it's the ant integration that
is line based.

*** This issue has been marked as a duplicate of 56341 ***