-
Enhancement
-
Resolution: Fixed
-
P3
-
9
-
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
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
- blocks
-
JDK-8169821 jshell tool: jshell missing from SPI for tools
-
- Open
-
- duplicates
-
JDK-8138586 Provide a unified programmatic way to invoke JDK tools
-
- Closed
-
- relates to
-
JDK-8164689 Retrofit jar, jlink, jmod as a ToolProvider
-
- Resolved
-
-
JDK-8162359 javac should use stdout for --help and --version
-
- Closed
-
-
JDK-8170251 Add javax.tools.Tool.name()
-
- Closed
-