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.
Summary: | System.out.print and System.out.print are not working when working on netbeans 8.0.2 | ||
---|---|---|---|
Product: | java | Reporter: | gbnreddy |
Component: | Unsupported | Assignee: | Martin Balin <mbalin> |
Status: | NEW --- | ||
Severity: | normal | CC: | gbnreddy |
Priority: | P3 | ||
Version: | 8.0.2 | ||
Hardware: | PC | ||
OS: | Windows 10 | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
gbnreddy
2015-10-16 03:41:25 UTC
If e.g. "System.out.println("m="+ m + ", s=" + s + ", ms=" + ms);" is used under System.out.printf then it is always printed to output. Seems like an issue with java Formatter The problem is that the output window is not a console, the System.out is a PrintStream (buffered) with autoFlush==true so it's flushed by: The output is flushed either by: 1) By call of println 2) By '\n' char 3) byte[] The 3) causes that it works fine on console but it's not flushed in output window, it requires '\n' or close. When i tried the code it worked for first time later its not printing . Thank u Martin Balin that worked but i want to clear the console at each iteration of loop (In reply to Tomas Zezula from comment #2) > The problem is that the output window is not a console, the System.out is a > PrintStream (buffered) with autoFlush==true so it's flushed by: > > The output is flushed either by: > 1) By call of println > 2) By '\n' char > 3) byte[] > > The 3) causes that it works fine on console but it's not flushed in output > window, it requires '\n' or close. Thank u Tomas Zezula \n worked but my requirement is \b . \n worked perfectly with printf \b is not working Please suggest me something to fix this \b not working issue |