You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Michael Bien (Jira)" <ji...@apache.org> on 2021/11/01 07:08:00 UTC

[jira] [Closed] (NETBEANS-5747) Basic user console input will not accept input

     [ https://issues.apache.org/jira/browse/NETBEANS-5747?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Bien closed NETBEANS-5747.
----------------------------------
    Resolution: Invalid

your program works fine.  Press ctrl+3 to open the output window which you can use for input too once your program is running.


{code:java}
Enter line of text: 
asdf
You entered this: asdf
------------------------------------------------------------------------
BUILD SUCCESS
------------------------------------------------------------------------{code}

> Basic user console input will not accept input
> ----------------------------------------------
>
>                 Key: NETBEANS-5747
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-5747
>             Project: NetBeans
>          Issue Type: Bug
>            Reporter: Martin Wichter
>            Priority: Critical
>         Attachments: UserInput.java
>
>
> // The folloinw short program runs fine but there is no way to input anything?
> // It runs fine using Windows 10 CMD line
> // I am new to Apache NetBean so the answer is probably obvious.
> // I have tried typing text on the same line as the prompt and the next it will not accept anything
>  
> import java.util.*;
> public class UserInput {
>     public static void main(String args[]) {
>         // Create Scanner Object
>         Scanner cons =  new Scanner(System.in);
>         
>         // Output the question
>         System.out.println("Enter line of text: ");
>         
>         // Wait for user input
>         String str = cons.nextLine();
>         
>         //display user input
>         System.out.println("You entered this: " + str);
>         
>         
>     }
> }



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists