title: IllegalStateException: Workspace is closed, while calling ResourcesPlugin.getWorkspace()
body: <p>I am currently trying to access my eclipse projects by using eclipses workspace
  and project abstractions, but i failed very soon.</p>
  
  <p>Please have a look at the following code:</p>
  
  <pre><code>public static void main(String[] args) throws Exception {
      String[] equinoxArgs = { "-debug", "-data", "C:\\dev\\build\\workspace" };
      EclipseStarter.startup(equinoxArgs, null);
      IWorkspace workspace = ResourcesPlugin.getWorkspace();
      System.out.println(workspace);
  }
  </code></pre>
  
  <p>If i execute it i get:</p>
  
  <pre><code>Exception in thread "main" java.lang.IllegalStateException: Workspace is closed.
      at org.eclipse.core.resources.ResourcesPlugin.getWorkspace(ResourcesPlugin.java:399)
      at de.jaculon.samples.osgi.OsgiSample.main(OsgiSample.java:21)
  </code></pre>
  
  <p>Does anyone know how to fix this?</p>
  
  <p>Thanks for your help.</p>