A DESCRIPTION OF THE PROBLEM :
The jlink command-line tool supports @files, but its ToolProvider implementation doesn't
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Open jshell and execute the following line:
java.util.spi.ToolProvider.findFirst("jlink").get().run(new PrintWriter(System.out, true), new PrintWriter(System.err, true), "@jlink.args")
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The "@jlink.args" argument is accepted (note that if "jlink.args" doesn't actually exist, it's expected that there'll be an error such as: "Error: could not open `jlink.args'")
ACTUAL -
jshell> java.util.spi.ToolProvider.findFirst("jlink").get().run(new PrintWriter(System.out, true), new PrintWriter(System.err, true), "@jlink.args")
Error: invalid argument: @jlink.args
Usage: jlink <options> --module-path <modulepath> --add-modules <module>[,<module>...]
Use --help for a list of possible options
$1 ==> 2
FREQUENCY : always
The jlink command-line tool supports @files, but its ToolProvider implementation doesn't
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Open jshell and execute the following line:
java.util.spi.ToolProvider.findFirst("jlink").get().run(new PrintWriter(System.out, true), new PrintWriter(System.err, true), "@jlink.args")
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The "@jlink.args" argument is accepted (note that if "jlink.args" doesn't actually exist, it's expected that there'll be an error such as: "Error: could not open `jlink.args'")
ACTUAL -
jshell> java.util.spi.ToolProvider.findFirst("jlink").get().run(new PrintWriter(System.out, true), new PrintWriter(System.err, true), "@jlink.args")
Error: invalid argument: @jlink.args
Usage: jlink <options> --module-path <modulepath> --add-modules <module>[,<module>...]
Use --help for a list of possible options
$1 ==> 2
FREQUENCY : always
- relates to
-
JDK-8275072 Add static expandArgumentFiles method to ToolProvider
- Closed
-
JDK-8236919 Refactor com.sun.tools.javac.main.CommandLine into a reusable module for other JDK tools
- Resolved