title: How do we get notified about system clipboard events?
body: <p>Hi all I want to write a simple program (just for learning purposes) that monitors the system clipboard data and serializes its contents.</p>
  
  <p>For example, whenever the user copies some <em>data</em> into the system clipboard (Ctrl-C <em>etc</em>), my program should receive a "notification" and serialize the clipboard data into a file.</p>
  
  <p>I've looked into <a href="http://docs.oracle.com/javase/7/docs/api/java/awt/datatransfer/package-summary.html" rel="nofollow">java.awt.datatransfer</a> but there doesn't seem to be any way I could hook a callback onto the system event whenever data is copied to the clipboard.</p>
  
  <p>How do we get notified about system clipboard events?</p>
  
  <p><sub>It's ok if the solution works only for windows, but OS inter-operability is a plus of course.</sub></p>