try {
IRuntimeWorkingCopy runtime = rtt.createRuntime(rtt.getId(), monitor);
// commented out the naming of the runtime as it seems to break server to runtime links
runtime.setName(dir.getName());
runtime.setLocation(new Path(absolutePath));
IStatus status = runtime.validate(monitor);
if (status == null || status.getSeverity() != IStatus.ERROR) {
return runtime;
}
} catch (Exception e) {
Activator.getLogger().error(e);