我需要执行这个命令来停止 selenium 服务器。
wmic path win32_process Where "CommandLine Like '%selenium-server%'" Call Terminate
从我的java程序。我试过了
Runtime.getRuntime().exec("command as a single string escaped")
和
Runtime.getRuntime().exec(String[])
但它没有被执行。当我从 cmd 执行相同的命令时,它工作正常。有人可以帮忙吗。