title: toolkit getdefaulttoolkit crash the apps after press a button
body: <p>//   </p>
  
  <pre><code> //System.setProperty("java.awt.headless", "true");
              java.awt.Toolkit toolkit = java.awt.Toolkit.getDefaultToolkit();
              java.awt.datatransfer.Clipboard clipboard = toolkit.getSystemClipboard();
              String result = null;``
              try {
                  result = (String) clipboard.getData(DataFlavor.stringFlavor);
              } catch (Exception e1) {
                  // TODO Auto-generated catch block
                  e1.printStackTrace();
              }
  </code></pre>
  
  <p>I set Headles to true it didnt work either
  Thank you for your reply</p>