public static IRuntimeWorkingCopy getRuntime(String runtimeTypeId, IPath location) { IRuntimeType runtimeType = ServerCore.findRuntimeType(runtimeTypeId); try { IRuntime runtime = runtimeType.createRuntime("runtime", null); IRuntimeWorkingCopy runtimeWC = runtime.createWorkingCopy(); runtimeWC.setName("Runtime"); runtimeWC.setLocation(location); return runtimeWC; } catch (CoreException e) { e.printStackTrace(); } return null; }