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.
public class Main { /** Creates a new instance of Main */ public Main() { } /** * @param args the command line arguments */ public static void main(String[] args) { readEntry("give me a ..."); } public static String readEntry(String message) { try { StringBuffer buffer = new StringBuffer(); System.out.print(message); System.out.flush(); int c = System.in.read(); while (c != '\n' && c != -1) { buffer.append((char)c); c = System.in.read(); } return buffer.toString().trim(); } catch(Exception e) { return ""; } } }
It has been already fixed for NB4.1 (it will be released next week).
*** This issue has been marked as a duplicate of 47708 ***