[英]Windows: How to read command-line options from external file?
javac.exe provides a mechanism to read arguments from external files ( @argfile
). javac.exe提供了一种从外部文件 ( @argfile
) 读取参数的机制。 java.exe does not provide this mechanism. java.exe不提供此机制。
Is there a generic mechanism for getting Windows to read some of the command-line options from an external file (and others from the normal command-line) in order to emulate the same behavior for java.exe
? 是否存在使Windows从外部文件中读取某些命令行选项(从正常命令行中读取其他命令行选项)以模拟java.exe
相同行为的通用机制?
Not a one-liner, but the following should do the trick: 不是单线的,而是以下方法可以解决问题:
SET /P ARGS=<foo.txt
java -someArgs %ARGS% -moreArgs
See also Batch equivalent of Bash backticks . 另请参见等效的Bash反引号 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.