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

Create an SPI for tools

XMLWordPrintable

    • b140
    • Verified

      It would be good to create an SPI for simple command line tools, for simple use of JDK tools and others.

      Proposed package java.util.spi
      Following the existing naming convention the proposed name is ToolProvider

      API should include the following methods:
          String getName();
          int run(PrintWriter pw, String... args)

      Possible additional methods
          default int run(PrintStream ps, String... args) // creates a PrintWriter and calls other method

          static ToolProvider lookup(String name) // use ServiceLoader to locate first instance of named service

            jjg Jonathan Gibbons
            jjg Jonathan Gibbons
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: