执行此代码时出现错误:
Runtime.getRuntime().exec("%windir%\\system32\\RunDll32.exe shell32.dll,ShellExec_RunDLL \"" + "C:\\test\\testcloud.txt" + "\\\"");
错误是:
java.io.IOException: CreateProcess: %windir%\system32\RunDll32.exe shell32.dll,ShellExec_RunDLL "C:\test\testcloud.txt\" error=2
at java.lang.Win32Process.create(Native Method)
at java.lang.Win32Process.<init>(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 java.lang.Runtime.exec(Runtime.java:325)
at com.hoc.ejems2.client.frames.JDiaAttachments.loadFile(JDiaAttachments.java:666)
它在 Winserver 2003 上正常运行。