0
我试图通过Java启动英雄联盟应用程序,但它的工作原理是为了让它获得英雄联盟加载徽标,我需要关闭父应用程序,启动通过一个过程在Java的应用程序,但不关闭父应用程序?
这里是运行它:
File dir = new File("C:/Riot Games/League of Legends/RADS/solutions/lol_game_client_sln/releases/0.0.1.110/deploy/");
String[] cmd = new String[] {
dir.getAbsolutePath() + File.separator + "League of Legends.exe",
"8394",
"LoLLauncher.exe",
"\"\"",
"spectator spectator.na.lol.riotgames.com:80 " + currentGame.getObservers().getEncryptionKey() + " " + currentGame.getGameId() + " NA1"};
try {
Runtime.getRuntime().exec(cmd, null, dir);
} catch (IOException e) {
e.printStackTrace();
}
它只是说,没有响应,如果父应用程序仍处于打开状态,之后我关闭父应用程序,它开始加载和作品。
我用了一个StreamGobbler我发现输入的输入和错误流进它和它的工作就像魔术!谢谢您的帮助 – Rez