Skip to content

Commit

Permalink
Merge pull request #877 from RoiEXLab/AddMapCreatorLaunch
Browse files Browse the repository at this point in the history
Added button for MapCreator launch | Some workarounds(#843)
  • Loading branch information
DanVanAtta committed Jun 25, 2016
2 parents 1ed0306 + 3d807b6 commit 2638066
Show file tree
Hide file tree
Showing 4 changed files with 245 additions and 241 deletions.
9 changes: 9 additions & 0 deletions src/games/strategy/engine/framework/ProcessRunnerUtil.java
Expand Up @@ -3,6 +3,7 @@
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;

import games.strategy.debug.ClientLogger;
Expand All @@ -13,6 +14,14 @@
* To hold various static utility methods for running a java program.
*/
public class ProcessRunnerUtil {

public static void runClass(Class<?> mainClass) {
final List<String> commands = new ArrayList<>();
populateBasicJavaArgs(commands);
commands.add(mainClass.getName());
exec(commands);
}

public static void populateBasicJavaArgs(final List<String> commands) {
populateBasicJavaArgs(commands, System.getProperty("java.class.path"));
}
Expand Down

0 comments on commit 2638066

Please sign in to comment.