IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject("MyProject"); IFolder folder = project.getFolder("src/main/java");In this example, the getWorkspace method returns the workspace root, which is used to obtain the project named "MyProject". The getFolder method is then used to obtain the "src/main/java" folder within the project. The package for this library is org.eclipse.core.resources.