title: "Runnable Jar" SWT elements dont work
body: <p>I have a problem deploying an application with SWT components.</p>
  
  <p>I read <a href="https://stackoverflow.com/questions/5703825/does-swing-support-windows-7-style-file-choosers">SO link</a> and incorporated SWT with swing into my code.<br>
  When I run it in eclipse 3.7.1 Indigo (<kbd>Ctrl</kbd>+<kbd>F11</kbd> or <kbd>Alt</kbd> + <kbd>Shift</kbd> <kbd>X</kbd>, <kbd>J</kbd>).
  It runs perfectly inside eclipse.</p>
  
  <p>However when I export the file as a "runnable JAR":<br>
  The application itself runs fine, but the SWT file choosers don't.</p>
  
  <p>When I export the file as a JAR, i.e. adding the manifest according to:  <a href="http://wiki.eclipse.org/FAQ_How_do_I_create_an_executable_JAR_file_for_a_stand-alone_SWT_program%3F" rel="nofollow noreferrer">wiki eclipse link </a> + <a href="https://stackoverflow.com/questions/6371674/why-doesnt-a-runnable-jar-exported-from-eclipse-work">SO link</a> + <a href="https://stackoverflow.com/questions/4881136/runnable-jar-file-generated-by-eclipse-wont-execute">SO link</a> + <a href="https://stackoverflow.com/questions/2282777/eclipse-create-runnable-jar-problem">SO link</a> and I get the error listed in the troubleshoot section (eclipse wiki).
  I checked all the solutions listed there but they didn't work for me.</p>
  
  <p>Questions:</p>
  
  <ol>
  <li>Why do SWT file choosers work in eclipse and not in a "runnable
  jar"? </li>
  <li>Why does the "runnable jar" export wizard in eclipse, not
  automatically incorporate SWT?</li>
  <li>Why does the export as jar not work with the manifest, when the <code>swt.jar</code> is correctly named and in the runtime folder and the main class is correct,but it still gives the error?:<br> <code>Could not find the main class. Program will exit.</code></li>
  </ol>
  
  <p>I am assuming the simplest solution would be to just use Swing file choosers.  But I wanted to know how to get SWT applications to run outside eclipse.</p>
  
  <p>Regards</p>
  
  <p><strong>UPDATE:</strong> Turns out that all the <code>.jar</code> files (in the library build path) need to be added to the manifest.  I was just adding the <code>swt.jar</code> which is why I was getting the <code>Could not find main class...</code> error.  Adding the other <code>.jar</code> to the manifest solved Q3 above.</p>
  
  <p>When running from command line: SWT components work fine when exporting both jar + runnable jars.</p>
  
  <p>However, the SWT components don't work when trying to run the runnable jar by double clicking.  Q1 and Q2 still unsolved (SWT file choosers don't work when double clicking but work in <code>cmd java -jar</code>...).</p>