title: Why does JfileChooser.showOpenDialog hang on Mac OSX?
body: <p>I am using Eclipse to develop an SWT application.  The following code works on Windows but not on Macintosh:</p>
  
  <pre><code>import javax.swing.JFileChooser;
  
  public class Test {
      public static void main(String[] args) {
          final JFileChooser fc = new JFileChooser();
          int ret = fc.showOpenDialog(null);
          System.out.println("ret  = " + ret);
      }
  }
  </code></pre>
  
  <p>Upon entering <code>showOpenDialog</code>, the Mac cursor spins forever, and I get the following in the Java console:</p>
  
  <pre><code>2013-09-05 08:20:40.568 java[1271:707] [Java CocoaComponent compatibility mode]: Enabled
  2013-09-05 08:20:40.569 java[1271:707] [Java CocoaComponent compatibility mode]: Setting timeout for SWT to 0.100000
  2013-09-05 08:20:41.227 java[1271:dd03] *** -[NSConditionLock unlock]: lock (&lt;NSConditionLock: 0x7fa211e82600&gt; '(null)') unlocked when not locked
  2013-09-05 08:20:41.227 java[1271:dd03] *** Break on _NSLockError() to debug.
  </code></pre>
  
  <p>I've tried Java 1.6, Java 1.7.   I've tried setting
      <code>-Dcom.apple.awt.CocoaComponent.CompatibilityMode=false -XstartOnFirstThread</code>
  but that has no effect.</p>
  
  <p>This must be something really basic.  What am I missing?</p>