try { ServerSocket server = new ServerSocket(6880, 50, InetAddress.getByName("127.0.0.1")); spawnStarted(); server.close(); } catch(Exception e) { Debug.printStackTrace( e ); }
String classPath = System.getProperty("java.class.path"); //$NON-NLS-1$ String userPath = System.getProperty("user.dir"); //$NON-NLS-1$ String javaPath = System.getProperty("java.home") + System.getProperty("file.separator") + "bin" + System.getProperty("file.separator"); String exec = "\"" + javaPath + "java\" -classpath \"" + classPath + "\" " + classToStart; Logger.log("Main is about to execute : " + exec); File userDir = new File(userPath); String[] env = {"user.dir=" + userPath}; Runtime.getRuntime().exec(exec);