-1
"ls * .xml"を呼び出すプロセスを作成しようとしています。Javaプロセスの作成
このコードは、[OK]を動作します:
Process p=Runtime.getRuntime().exec("ls build.xml");
build.xml
このコードが間違っている:
Process p=Runtime.getRuntime().exec("ls *.xml");
// this is the output
Cannot run program "ls *.xml": error=2, No such file or directory
任意のアイデア?
を: 'Runtime.getRuntime()の幹部({「LS」、 "* .xml"})); –
[パス内のチルダを使用したbashスクリプトの実行]の可能な複製(http://stackoverflow.com/questions/15273524/executing-bash-script-with-tilde-in-path) –
注意:execを実行すると、 '*'や '>'のようなものを理解できるシェルが実行されていません。 –