private static void reboot() {
		String jarLocation = System.getProperty("java.class.path");
		if (IS_MAC) {
			jarLocation = ModelerUtilities.validateJarLocationOnMacOSX(jarLocation);
		}
		else if (System.getProperty("os.name").startsWith("Windows")) {
			jarLocation = "\"" + jarLocation + "\"";
		}
		String maxHeap = System.getProperty("mw.maxHeapSize");
		String s;
		if (maxHeap != null) {
			s = "java -Xmx" + maxHeap + " -jar " + jarLocation;
		} else {
			s = "java -Xmx128M -jar " + jarLocation;			
		}
		s += hostIsLocal ? " local" : " remote";
		if (startingURL != null)
			s += " " + startingURL;
		try {
			// MUST close this ServerSocket, or it will remain blocked even after shutdown
			if (serverSocket != null)
				serverSocket.close();
			Runtime.getRuntime().exec(s);
		}
		catch (Exception e) {
			e.printStackTrace();
		}
		finally {
			System.exit(0);
		}
	}