Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-1099

Scanner in JShell waits for input for ever

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 9.0
    • Next
    • java - JShell
    • None
    • MacOSX
      JDK 10.0.1
      Apache NetBeans 9.0 (released 29 July 2018)

    Description

      Issue has been encountered with JDK 10.0.1 but it also exists when starting NetBeans with JDK 9.

      Start JShell from Tools --> Open Java Platform Shell.

      Issue the following commands:

      [1]-> import java.util.Scanner;
      [2]-> Scanner sc = new Scanner(System.in);
      | sc ==> java.util.Scanner[delimiters=\p\{javaWhitespace}+][position=0][match valid=fa ...
      [3]-> int a = sc.nextInt();

      Executing, please wait

      The user is waiting for ever and s/he cannot do anything. In JDK JShell the user can enter a value and the program continues. In NetBeans, this is not possible. A stop button is displayed, but clicking on it does nothing.

       

       

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            jkost John Kostaras
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: