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 74270 - Output window is not reflecting expected output using System.out.print() and Thread.sleep()
Summary: Output window is not reflecting expected output using System.out.print() and ...
Status: RESOLVED DUPLICATE of bug 56341
Alias: None
Product: platform
Classification: Unclassified
Component: Output Window (show other bugs)
Version: 5.x
Hardware: All Linux
: P3 blocker (vote)
Assignee: Milos Kleint
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-01 11:10 UTC by david_p
Modified: 2008-12-22 20:32 UTC (History)
1 user (show)

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 david_p 2006-04-01 11:10:36 UTC
When executing the following program on NetBeans 5.0 and also on NetBeans 5.5:

-------------------------------------------------------------------------------
public class MainClass 
{    
   public MainClass() 
   {
   }
    
   public static void main(String[] args)
   {
       try
       {
           System.out.print("Hello ");
           Thread.sleep(5000);
           System.out.print("world");
           Thread.sleep(5000);
           System.out.print("!");
           Thread.sleep(5000);
       }
       catch(InterruptedException e)
       {
           System.out.println(e);
       }
   }
}
-------------------------------------------------------------------------------

I get an initial pause of 15 seconds (the sum of the three Thread.sleep())
followed by the printing of the "Hello world!" text on the output window,
instead of the expected behaviour: each System.out.print() followed by a 5
seconds pause. Executing the program via command line and also via Eclipse, the
output is the expected one.
Comment 1 Milos Kleint 2006-04-03 08:19:10 UTC
duplicate of #56341,
is caused by the fack that we use ant for execution. And processes output line
by line.


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