启动另一个exe应用程序并使用Java打印文本

时间:2018-11-18 10:31:47

标签: java

我想从我的Java Application另一个exe开始。 当我使用ProcessBuilder或Runtime.exec执行此操作时,它不会启动。

Process p = new ProcessBuilder(mn.getPath() 
                               + "/Modnite Patcher win10-x86/Modnite Patcher.exe").start();

当我使用Destop执行此操作时,它会起作用:

Desktop.getDesktop().open(new File(mn.getPath() 
                                   + "/Modnite Patcher win10-x86/Modnite Patcher.exe"));

但是它不返回任何东西,我也不能在其中写文本。

如何启动另一个应用程序并在其中编写文本(例如 它开始并输入“ D:\ Downloads”,然后按Enter)

0 个答案:

没有答案
相关问题