当我运行此命令时
openssl enc -aes-128-cfb -e -in /tmp/ABC.txt -out /tmp/DEF.txt -pass pass:***
通过终端它执行得很好,但是当我尝试使用ProcessBuilder
通过Java执行它时,它给了我错误
java.io.IOException:无法运行程序“ openssl enc -aes-128-cfb -e -in /tmp/ABC.txt -out /tmp/DEF.txt -pass pass:***“:错误= 2,没有这样的文件或目录
这就是我在Java中所做的:
ProcessBuilder builder = new ProcessBuilder("openssl enc -aes-128-cfb -e -in " + "/tmp/" + "ABC.txt" + " -out " + "/tmp/" + "DEF.txt" + " -pass pass:***" );
builder.start();
谁能告诉我我在做什么错?