title: Create IJavaProject from directory path
body: <p>I need to create a <code>org.eclipse.jdt.core.IJavaProject</code> instance from a given directory path to the java project. I only seem to find about creating new java projects dynamically or creating an <code>IJavaProject</code> from a given <code>IProject</code> (<code>org.eclipse.core.resources.IProject</code>) in the realm of eclipse plug-in development like so <code>JavaCore.create(iProjectInstance)</code>.
  How would I go about creating an IJavaProject from a given java project located at a given path? So I would be looking for something like this:</p>
  
  <pre><code>IJavaProject myJavaProject = Utility.getJavaProjectFromPath("C:/workspace/MyJavaProject");
  </code></pre>
  
  <p>EDIT:
  I have an ecplise plugin project and already can retrieve a IJavaProject via a IProject object I get from selecting a given project in the eclipse instance the plugin runs it. But I want to write a JUnit test for it and therefore need to somehow create the IJavaProject object just from a given path where a test project is located.</p>