(no subject)
Вот облом! Хочу сделать
protected static String[] dirArgs={"/s", "/-c", ""};
public void getListRecursive(DirectoryData dir, InfoComparator comparator) throws Exception
{
dirArgs[2]=root+dir.getPathName();
BufferedReader sysin=new BufferedReader(new InputStreamReader(Runtime.getRuntime().exec("dir", dirArgs).getInputStream()));
}
а получаю
Exception: CreateProcess: dir error=2
java.io.IOException: CreateProcess: dir error=2
at java.lang.Win32Process.create(Native Method)
at java.lang.Win32Process.(Win32Process.java:66)
at java.lang.Runtime.execInternal(Native Method)
at java.lang.Runtime.exec(Runtime.java:551)
at java.lang.Runtime.exec(Runtime.java:418)
at java.lang.Runtime.exec(Runtime.java:361)
at com.redeyes.net.sitesync.fs.FileSystemFileWindows.getListRecursive(FileSystemFileWindows.java:30)
Убираю аргументы, оставляю один dir – эффект устойчиво сохраняется.
Что бы это могло быть?
no subject
#define ERROR_FILE_NOT_FOUND 2L
Нету у тебя dir.exe, нету...
А вот "cmd.exe /c dir" - есть.
Re:
Vot do 4ego linux dovodit.
Tuk-tuk. Djatel ja.
Re:
no subject
http://java.sun.com/j2se/1.4.2/docs/api/java/io/File.html#list()
плохо?
Re: