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 52234 - Can't prompt for input from System.in in run window
Summary: Can't prompt for input from System.in in run window
Status: RESOLVED DUPLICATE of bug 47708
Alias: None
Product: ide
Classification: Unclassified
Component: Code (show other bugs)
Version: 4.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: issues@ide
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-09 03:33 UTC by xanthin
Modified: 2004-12-09 08:50 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 xanthin 2004-12-09 03:33:59 UTC
Build: NetBeans IDE 4.0 RC2 (Build 200412011810)

JDK version: build 1.5.0-b64

Observed Behavior: run window doesn't wait for 
readLine() while reading from System.in.

Expected Behavior:  run window to wait for 
readLine() and then print what was typed in.

--- Test Code ----

package test;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class SystemInTest {
    public static void main(String[] args) {
        try {
            System.out.print("Enter data: ");
            String s = (new BufferedReader(new 
InputStreamReader(System.in))).readLine();
            System.out.println(s);
        } catch (IOException ex) {
            ex.printStackTrace();
        }
    }
}
Comment 1 Milan Kubec 2004-12-09 08:48:51 UTC
Known issue, problem of Ant tool itself.

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