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

Add TOOLING.jsh script to set of built-in load scripts

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P4 P4
    • 23
    • None
    • tools
    • None

      When using JShell for interactive development and code exploration, it is often desirable to run JDK tools, that are usually executed on the command-line, “in-shell”: for example to avoid starting a new operating system shell and also for feeding a just created class as an input to a JDK tool and evaluate its output.

      This is shown here https://sormuras.github.io/blog/2023-03-09-jshell-tooling - including a link to the source of TOOLING.jsh.

      We should add TOOLING.jsh script to set of built-in load scripts in order to omit the "/open https://github.com/sormuras/jdk-tools/blob/main/TOOLING.jsh" command. It will even able users to start a JShell session with JDK tool support activated directly from the command-line via:

      $> jshell TOOLING

      jshell> interface Empty {}
      jshell> javap(Empty.class)

            cstein Christian Stein
            cstein Christian Stein
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: