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

JShell printing ANSI escape sequences in git-bash for Windows

XMLWordPrintable

    • x86_64
    • windows

      A DESCRIPTION OF THE PROBLEM :
      After updating from JDK 11.0.8 to 11.0.9, JShell is printing out ANSI escape sequences when run from git-bash under Windows. (The problem does not occur when using Powershell or cmd.exe.) This is probably related to the update to JLine that occurred with this release.

      REGRESSION : Last worked in version 11

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Start JShell in a git-bash window.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Expect to see the following output:

      | Welcome to JShell -- Version 11.0.9
      | For an introduction type: /help intro

      jshell>
      ACTUAL -
      Actually see this output:

      | Welcome to JShell -- Version 11.0.9
      | For an introduction type: /help intro
      ←[?1h←=←[?2004h
      jshell>

      ---------- BEGIN SOURCE ----------
      (no source code necessary)
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      Only workaround found so far is to use a different terminal. Note that this was not necessary with JDK 11.0.8 which did not have this problem.

      FREQUENCY : always


            jlahoda Jan Lahoda
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: