IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(); URI location = project.getLocationURI(); System.out.println("Project location: " + location);
IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject("MyProject"); URI location = project.getLocationURI(); System.out.println("Project location: " + location);This code gets a specific project named "MyProject" and retrieves its location URI. The location URI is then printed to the console. Package library: org.eclipse.core.resources