JShell API: no way for the jshell tool to report exit status to provider

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 10
    • Affects Version/s: 9
    • Component/s: tools
    • b33
    • generic
    • generic

      jdk.internal.jshell.tool.JShellToolProvider, which is run by the launcher, reports exit code per Tool.run().

      However, the jdk.jshell.tool.JavaShellToolBuilder API declares run() as a void method, providing no way to exit code from the tool. These occur when:

      (1) The tool fails during launch (e.g. missing load file)

      (2) The user explicitly exits with an exit code (JDK-8185840)

      Solution:
      A new version of the run method is needed in the builder which returns the exit code.
       

            Assignee:
            Robert Field (Inactive)
            Reporter:
            Robert Field (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: