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

JShell API: JShell with Readers and Writers

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Open
    • Priority: P5
    • Resolution: Unresolved
    • Affects Version/s: 9
    • Fix Version/s: tbd
    • Component/s: tools
    • Labels:

      Description

      JShell has the following method:

          /**
           * Create a evaluation processing environment from which the state engine
           * and analysis support can be accessed.
           *
           * @param in Input for the running evaluation (it's System.in).
           * @param out Output for the running evaluation (it's System.out).
           * @param err Error output for the running evaluation (it's System.err).
           * @return the entry point into evaluation processing support.
           */
          public static JShell create(InputStream in, PrintStream out, PrintStream err) {
              return new JShellImpl(in, out, err);
          }

      but while InputStream and PrintStream are convenient for hooking up to a Unix-like terminal window, for embedded use, it would be more convenient if it also had a method that took Readers and Writers, and so avoid the round trip from characters to bytes and back again.

      -- Jon

        Attachments

          Activity

            People

            Assignee:
            rfield Robert Field
            Reporter:
            rfield Robert Field
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: