Index: /trunk/src/org/openstreetmap/josm/tools/Utils.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/Utils.java	(revision 5220)
+++ /trunk/src/org/openstreetmap/josm/tools/Utils.java	(revision 5221)
@@ -23,5 +23,4 @@
 import java.util.Iterator;
 import java.util.List;
-import org.openstreetmap.josm.data.osm.OsmPrimitive;
 
 /**
@@ -327,5 +326,17 @@
      */
     public static String getClipboardContent() {
-        Transferable t = Toolkit.getDefaultToolkit().getSystemClipboard().getContents(null);
+        Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
+        Transferable t = null;
+        for (int tries = 0; t == null && tries < 10; tries++) {
+            try {
+                t = clipboard.getContents(null);
+            } catch (IllegalStateException e) { 
+                // Clipboard currently unavailable. On some platforms, the system clipboard is unavailable while it is accessed by another application.
+                try {
+                    Thread.sleep(1);
+                } catch (InterruptedException ex) {
+                }
+            }
+        }
         try {
             if (t != null && t.isDataFlavorSupported(DataFlavor.stringFlavor)) {
