// get the workspace root IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); // create a new project with the specified name IProject project = root.getProject("MyProject"); // create the project and open it project.create(null); project.open(null);
// get the project's name String projectName = project.getName(); // get the project's location on disk IPath projectPath = project.getLocation();Overall, the org.eclipse.core.resources package is part of the Eclipse platform and is used to work with resources within the workspace.