Index: trunk/src/org/openstreetmap/josm/tools/OpenBrowser.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/OpenBrowser.java	(revision 3523)
+++ trunk/src/org/openstreetmap/josm/tools/OpenBrowser.java	(revision 3524)
@@ -4,6 +4,8 @@
 import static org.openstreetmap.josm.tools.I18n.tr;
 
+import java.awt.Desktop;
 import java.io.IOException;
 import java.net.MalformedURLException;
+import java.net.URI;
 import java.net.URL;
 
@@ -26,9 +28,9 @@
      * {@see Main#platform}
      */
-    public static String displayUrl(String url) throws IllegalStateException {
+    public static String displayUrl(URI uri) {
         if (Main.applet) {
             try {
                 JApplet applet = (JApplet) Main.parent;
-                applet.getAppletContext().showDocument(new URL(url));
+                applet.getAppletContext().showDocument(uri.toURL());
                 return null;
             } catch (MalformedURLException mue) {
@@ -37,13 +39,31 @@
         }
 
-        if (Main.platform == null)
-            throw new IllegalStateException(tr("Failed to open URL. There is currently no platform set. Please set a platform first."));
-        try {
-            Main.platform.openUrl(url);
-        } catch (IOException e) {
-            return e.getMessage();
+        if (Desktop.isDesktopSupported()) {
+            try {
+                Desktop.getDesktop().browse(uri);
+            } catch (Exception e) {
+                e.printStackTrace();
+                return e.getMessage();
+            }
+        } else {
+            System.err.println("Warning: Desktop class is not supported. Platform dependent fall back for open url in browser.");
+
+            if (Main.platform == null)
+                throw new IllegalStateException(tr("Failed to open URL. There is currently no platform set. Please set a platform first."));
+            try {
+                Main.platform.openUrl(uri.toString());
+            } catch (IOException e) {
+                return e.getMessage();
+            }
         }
         return null;
     }
 
+    public static String displayUrl(String url) {
+        try {
+            return displayUrl(new URI(url));
+        } catch (Exception e) {
+            return e.getMessage();
+        }
+    }
 }
