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 64037 - Console emulation of System.out.println incorrect
Summary: Console emulation of System.out.println incorrect
Status: RESOLVED DUPLICATE of bug 56341
Alias: None
Product: projects
Classification: Unclassified
Component: Ant (show other bugs)
Version: 4.x
Hardware: All Linux
: P4 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-10 15:39 UTC by aroyce
Modified: 2006-11-21 01:54 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 aroyce 2005-09-10 15:39:12 UTC
I am using netBeans to teach a college course in object-oriented programming
using Java.  For many examples and problems we use console input and output.  I
have noticed the following code fragment does not work correctly:

        Scanner scan = new Scanner(System.in);
        
        //Prompt for and read in the number of quarters
        System.out.print("Enter number of quarters: ");
        numquarters = scan.nextInt();
        
Nothing is printed in the Output section but the user is still prompted. 
Changing the print to a println resolves this but then the program would
incorrecly prompt in a real console, previous version of netBeans or Eclipse. 
Personally, I like the way the 3.x versions handled console input.  I know this
is probably a minor thing with the IDE since its focus is J2EE development but
it does cause an issue with my students since I want to expose them to this type
of technology to work this.  Thank you.
Comment 1 Milos Kleint 2005-09-15 14:18:52 UTC
ant related AFAIK. ant prints just complete lines, so the print() call is not
even reaching the output window.
 reassigning to jesse.
Comment 2 Jesse Glick 2005-09-15 18:42:14 UTC
Right, cannot currently fix - needs changes in Ant.
Comment 3 Jesse Glick 2006-11-21 01:54:04 UTC

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