Index: /trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java	(revision 6951)
+++ /trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java	(revision 6952)
@@ -21,4 +21,5 @@
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.gui.ExtendedDialog;
+import org.openstreetmap.josm.gui.util.GuiHelper;
 
 /**
@@ -345,31 +346,36 @@
     }
 
-    protected void askUpdateJava(String version, String url) {
-        try {
-            ExtendedDialog ed = new ExtendedDialog(
-                    Main.parent,
-                    tr("Outdated Java version"),
-                    new String[]{tr("Update Java"), tr("Cancel")});
-            // Check if the dialog has not already been permanently hidden by user
-            if (!ed.toggleEnable("askUpdateJava7").toggleCheckState()) {
-                ed.setButtonIcons(new String[]{"java.png", "cancel.png"}).setCancelButton(2);
-                ed.setMinimumSize(new Dimension(480, 300));
-                ed.setIcon(JOptionPane.WARNING_MESSAGE);
-                String content = tr("You are running version {0} of Java.", "<b>"+version+"</b>")+"<br><br>";
-                if ("Sun Microsystems Inc.".equals(System.getProperty("java.vendor")) && !isOpenJDK()) {
-                    content += "<b>"+tr("This version is no longer supported by {0} since {1} and is not recommended for use.",
-                            "Oracle", tr("February 2013"))+"</b><br><br>";
-                }
-                content += "<b>"+tr("JOSM will soon stop working with this version; we highly recommend you to update to Java {0}.", "7")+"</b><br><br>"+
-                        tr("Would you like to update now ?");
-                ed.setContent(content);
-
-                if (ed.showDialog().getValue() == 1) {
-                    openUrl(url);
-                }
-            }
-        } catch (IOException e) {
-            Main.warn(e);
-        }
+    protected void askUpdateJava(final String version, final String url) {
+        GuiHelper.runInEDTAndWait(new Runnable() {
+            @Override
+            public void run() {
+                ExtendedDialog ed = new ExtendedDialog(
+                        Main.parent,
+                        tr("Outdated Java version"),
+                        new String[]{tr("Update Java"), tr("Cancel")});
+                // Check if the dialog has not already been permanently hidden by user
+                if (!ed.toggleEnable("askUpdateJava7").toggleCheckState()) {
+                    ed.setButtonIcons(new String[]{"java.png", "cancel.png"}).setCancelButton(2);
+                    ed.setMinimumSize(new Dimension(480, 300));
+                    ed.setIcon(JOptionPane.WARNING_MESSAGE);
+                    String content = tr("You are running version {0} of Java.", "<b>"+version+"</b>")+"<br><br>";
+                    if ("Sun Microsystems Inc.".equals(System.getProperty("java.vendor")) && !isOpenJDK()) {
+                        content += "<b>"+tr("This version is no longer supported by {0} since {1} and is not recommended for use.",
+                                "Oracle", tr("February 2013"))+"</b><br><br>";
+                    }
+                    content += "<b>"+tr("JOSM will soon stop working with this version; we highly recommend you to update to Java {0}.", "7")+"</b><br><br>"+
+                            tr("Would you like to update now ?");
+                    ed.setContent(content);
+
+                    if (ed.showDialog().getValue() == 1) {
+                        try {
+                            openUrl(url);
+                        } catch (IOException e) {
+                            Main.warn(e);
+                        }
+                    }
+                }
+            }
+        });
     }
 }
