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

Create an SPI for tools

    XMLWordPrintable

Details

    • b140
    • Verified

    Description

      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

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: