Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8155705

Jshell System.in still does not work - hangs on input

XMLWordPrintable

    • generic
    • generic

      FULL PRODUCT VERSION :
      javac 9-ea
      java version "9-ea"
      Java(TM) SE Runtime Environment (build 9-ea+115)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows [Version 6.1.7601]

      A DESCRIPTION OF THE PROBLEM :
      Running these commands on Windows locks the command window with no visible typing:

      Scanner in = new Scanner(System.in);
      String input = in.nextLine();

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      See above. This seems to be a multi-process communication issue.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      String input should be assigned the value I type at the keyboard followed by Enter.
      ACTUAL -
      command window locks up

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      see above - these are input lines to Jshell
      ---------- END SOURCE ----------

            rfield Robert Field (Inactive)
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: