title: Can't use JFace and SWT in eclipse without creating plugin
body: <p><strong>DISCLAIMER</strong>: </p>
  
  <p>this is the classic case of .NET GUI trying to work his way around JAVA stuff.</p>
  
  <p><strong>PROBLEM DESCRIPTION:</strong></p>
  
  <p>I am trying to build a very simple GUI with JFace and SWT - the code is straightforward (there's plenty tutorials), what it's not so straightforward is that I can't seem to get JFace and SWT to work outside a plugin project.</p>
  
  <p>I would expect to be able to use JFace and SWT in my project no hassle, since I put "C:/eclipse 3.5/plugins" in my CLASSPATH (from my computer --> properties --> advanced --> environment variables) and all the swt-*.dll I could find in my PATH (both local user and global PATHs, to be sure) as <a href="http://www.ibm.com/developerworks/opensource/library/os-jface1/" rel="nofollow noreferrer">this article</a> indicates in the "Installing SWT and JFace" box.</p>
  
  <p>Problem is I can't import anything from eclipse.org unless I reference directly the jars from buildpath --> libraries --> add external jars (in order for it to build I have to add the following jars: <strong>org.eclipse.swt.win32.win32.x86_3.5.1.v3555a.jar</strong>, <strong>org.eclipse.jface_3.5.1.M20090826-0800.jar</strong>). Once I do that it builds fine but then when I run it as "Java Application" I get the following error (should I <em>RUN AS</em> something else?):</p>
  
  <pre><code>Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/core/runtime/IProgressMonitor
      at demo.ui.test.EntryPoint.main(EntryPoint.java:18)
  Caused by: java.lang.ClassNotFoundException: org.eclipse.core.runtime.IProgressMonitor
      at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
      ... 1 more
  </code></pre>
  
  <p>I tried to debug this and basically it is thrown as soon as it tries to instantiate the <code>ApplicationWindow</code> class (org.eclipse.jface.window.ApplicationWindow). Trying to reproduce the error, I commented out all my code and replaced it with the following in my main and it throws he same error as above on the first line:</p>
  
  <pre><code>ApplicationWindow w = new ApplicationWindow(null); //&lt;-- error on this line
  w.setBlockOnOpen(true);
  w.open();
  Display.getCurrent().dispose();
  </code></pre>
  
  <p><strong>QUESTIONS:</strong></p>
  
  <p><strong>Question 1</strong>: how can I fix the error above (I'd like to understand what's going on) and get the damn thing to run?</p>
  
  <p><strong>Question 2</strong>: why the jars are not visible to my project and how to make them?</p>
  
  <p>I am probably missing something very trivial due to my lack of familiarity with Java and eclipse. Any help highly appreciated! </p>
  
  <p><strong>EDIT</strong>: seems like someone else had the same problem --> <a href="http://www.eclipsezone.com/eclipse/forums/t60528.html" rel="nofollow noreferrer">http://www.eclipsezone.com/eclipse/forums/t60528.html</a> - not too clear how they solved it though, assistance appreciated</p>