我一直在使用Powershell-1.0作为命令行需求,而不是cmd.exe.不幸的是,使用java时仍有一些注意事项.我需要将属性传递给jar,就像那样:
java -jar -Duser.language=en any.jar
Run Code Online (Sandbox Code Playgroud)
这行在cmd.exe中工作正常,但在Powershell中没有,因为它搜索另一个jar:无法访问jarfile user.language = en
使用引号没有帮助.
它在Powershell-1.0中是可行的,还是我在Java中遗漏了什么?
提前致谢,
问候,
jgran