[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.webtools] Re: Getting Server Runtime ClasspathEntry

Found the solution in ServerClasspathContainerPage (org.eclipse.jst.server.ui.internal).

IRuntime[] runtimes = ServerCore.getRuntimes();
for (IRuntime runtime : runtimes) {
if (runtime.getRuntimeType() != null) {
RuntimeClasspathProviderWrapper rcpw = JavaServerPlugin.findRuntimeClasspathProvider(runtime.getRuntimeType());
if (rcpw != null) {
IPath serverContainerPath = new Path(RuntimeClasspathContainer.SERVER_CONTAINER)
.append(rcpw.getId()).append(runtime.getId());
runtimeMap.put(runtime, JavaCore.newContainerEntry(serverContainerPath));
}
}
}


This seems to work.