これはJAVAプログラミング言語の質問です
これは実行しようとしているコードです:
MyRuntime = Runtime.getRuntime();
File temp = new File("C:\\Command Line Apps\\cURL\\");
for(String filenames : temp.list()) System.out.println(filenames);
curl = MyRuntime.exec("curl.exe", null, temp);
出力は次のとおりです。
java ScreenshotMaker
build.txt
CHANGES
COPYING
curl.exe
curl.html
curl.pdf
libcurl.dll
libeay32.dll
libidn-11.dll
libssl32.dll
mk-ca-bundle.vbs
README
RELEASE-NOTES
_curlrc
Exception in thread "main" java.io.IOException: Cannot run program "curl" (in di
rectory "C:\Command Line Apps\cURL"): CreateProcess error=2, The system cannot f
ind the file specified
ご覧のとおり、curl.exeはディレクトリにあります。しかし、Runtime.exec()はそれを認識していないようです。
それを修正するにはどうすればよいですか?ありがとう