【发布时间】:2014-06-25 07:23:14
【问题描述】:
我正在使用 MSG 命令[NETSEND 不再可用] 将消息从 Win 7/2008 服务器(32/64 位)发送到 Win 7/2008 服务器(32/64 位),我的 Java 应用程序是 32 位和由于某些要求(使用 java 7 update 25),不能使用 64 位。 当我在下面运行我的 java 应用程序时,场景是这样的
- 32 位 Win 7/2008 服务器到 32 位 Win 7/2008 - 工作
- 32 位 Win 7/2008 服务器到 64 位 Win 7/2008 - 工作
-
32 位 Win 7/2008 服务器到 64 位 Win 7/2008 - 工作
4. 64 位 Win 7/2008 服务器到 64 位 Win 7/2008 - 不工作
5. 64 位 Win 7/2008 服务器到 32 位 Win 7/2008 - 不工作
是否有任何解决方法可以使这项工作在 64 位 Win 7/2008 服务器上工作?
package msgcommand;
import java.io.*;
public class TestExec {
public static void main(String[] args) {
try {
Process p = Runtime.getRuntime().exec("cmd /C MSG.exe /SERVER:127.0.0.1 * test");
BufferedReader in = new BufferedReader(
new InputStreamReader(p.getInputStream()));
String line = null;
while ((line = in.readLine()) != null) {
System.out.println(line);
}
} catch (IOException e) {
e.printStackTrace();
}
}
}
【问题讨论】:
标签: java windows windows-7 windows-7-x64 msg