Java 32位jre上的wget命令不工作

Java 32位jre上的wget命令不工作,java,wget,Java,Wget,我的WGET命令在32位JRE下不起作用,但在64位版本上运行良好。有什么想法吗 java.io.IOException: Cannot run program "wget": CreateProcess error=2, cannot find file String command = "wget --quiet -O \""+props.getProperty("xmlFolder")+""+rs.getString("software")+".xml\" \"ftp://"+props

我的WGET命令在32位JRE下不起作用,但在64位版本上运行良好。有什么想法吗

java.io.IOException: Cannot run program "wget": CreateProcess error=2, cannot find file

String command = "wget --quiet -O \""+props.getProperty("xmlFolder")+""+rs.getString("software")+".xml\" \"ftp://"+props.getProperty("ftpUser")+":"+props.getProperty("ftpPasswort")+"@"+rs.getString("xmlPfad")+"\"";

              System.out.println(command); 
              Process p = Runtime.getRuntime().exec(command);

              p.waitFor();

不要试图用单个字符串和引号在java中执行进程。将每个参数分隔为单独的java字符串,并使用
exec(string[])
方法


然后,找出
wget
不在路径中的原因,将其添加到路径中或使用可执行文件的绝对路径。

它表示
CreateProcess error=2,找不到文件
。这给了你一个提示吗?一点也不,因为当我将netbeans中的JRE切换到64位时,它工作得很好。我知道该文件存在。好的,我会试试。但是,当我将命令复制到命令行时,它就可以正常工作了。它在我的netbeans程序中不起作用。