String pluginID = “com.examples.eclipse.test”;
String baseSegment = “Samples”;
String fileName = “testProject.zip”;

org.eclipse.emf.common.util.URI uri = org.eclipse.emf.common.util.URI
.createPlatformPluginURI(pluginID, true);
uri = uri.appendSegments(new String[] { baseSegment, fileName});

uri = CommonPlugin.resolve(uri);

String path = uri.toFileString();

File resolvedFile = new File(path);

Advertisements