package org.cipres.kepler; import java.io.IOException; public class KeplerRunner { public static void main(String args[]) { String platform = System.getProperty("os.name"); String directory = System.getProperty("user.dir"); // System.out.println("OS = " + platform + " DIR = " + directory); if (platform.equals("Mac OS X")) { runCommand(directory + "/kepler.sh"); } else if (platform.substring(0, 7).equals("Windows")) { runCommand("cmd.exe /c start \"Kepler\" /min kepler.bat"); } } public static void runCommand(String command) { try { Runtime.getRuntime().exec(command); } catch(IOException ex) { System.out.println(ex.getMessage()); } } }