diff --git a/apps/desktopgui/build.xml b/apps/desktopgui/build.xml
index 5a18942ac5..02196c4162 100644
--- a/apps/desktopgui/build.xml
+++ b/apps/desktopgui/build.xml
@@ -34,6 +34,7 @@
+
diff --git a/apps/desktopgui/src/net/i2p/desktopgui/InternalTrayManager.java b/apps/desktopgui/src/net/i2p/desktopgui/InternalTrayManager.java
index 3b7984abeb..eeb9c958d3 100644
--- a/apps/desktopgui/src/net/i2p/desktopgui/InternalTrayManager.java
+++ b/apps/desktopgui/src/net/i2p/desktopgui/InternalTrayManager.java
@@ -6,16 +6,15 @@ import java.awt.MenuItem;
import java.awt.PopupMenu;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
-
+import java.io.IOException;
import javax.swing.JMenu;
import javax.swing.JMenuItem;
import javax.swing.JPopupMenu;
import javax.swing.SwingWorker;
+import net.i2p.apps.systray.UrlLauncher;
import net.i2p.data.DataHelper;
import net.i2p.desktopgui.router.RouterManager;
-import net.i2p.desktopgui.util.BrowseException;
-import net.i2p.desktopgui.util.I2PDesktop;
import net.i2p.router.RouterContext;
import net.i2p.util.Log;
import net.i2p.util.PortMapper;
@@ -433,15 +432,16 @@ class InternalTrayManager extends TrayManager {
* and launch the browser at it.
*
* Modified from I2PTunnelHTTPClientBase.
- * TODO perhaps move this to a new PortMapper method.
*
* @since 0.9.26
*/
private void launchBrowser() {
+ // null args ok
+ UrlLauncher launcher = new UrlLauncher(_context, null, null);
String url = _context.portMapper().getConsoleURL();
try {
- I2PDesktop.browse(url);
- } catch (BrowseException e1) {
+ launcher.openUrl(url);
+ } catch (IOException e1) {
log.log(Log.WARN, "Failed to open browser!", e1);
}
}
diff --git a/apps/desktopgui/src/net/i2p/desktopgui/Main.java b/apps/desktopgui/src/net/i2p/desktopgui/Main.java
index 754723b2b3..70b96d7a43 100644
--- a/apps/desktopgui/src/net/i2p/desktopgui/Main.java
+++ b/apps/desktopgui/src/net/i2p/desktopgui/Main.java
@@ -17,7 +17,6 @@ import net.i2p.app.ClientAppManager;
import net.i2p.app.ClientAppState;
import static net.i2p.app.ClientAppState.*;
import net.i2p.desktopgui.router.RouterManager;
-import net.i2p.desktopgui.util.*;
import net.i2p.router.RouterContext;
import net.i2p.router.app.RouterApp;
import net.i2p.util.Log;
diff --git a/apps/desktopgui/src/net/i2p/desktopgui/util/BrowseException.java b/apps/desktopgui/src/net/i2p/desktopgui/util/BrowseException.java
deleted file mode 100644
index a5e4f4350c..0000000000
--- a/apps/desktopgui/src/net/i2p/desktopgui/util/BrowseException.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package net.i2p.desktopgui.util;
-
-public class BrowseException extends Exception {
-
- private static final long serialVersionUID = 1L;
-
- public BrowseException() {
- super();
- }
-
- public BrowseException(String s) {
- super(s);
- }
-
- public BrowseException(String s, Throwable t) {
- super(s, t);
- }
-
- public BrowseException(Throwable t) {
- super(t);
- }
-
-}
\ No newline at end of file
diff --git a/apps/desktopgui/src/net/i2p/desktopgui/util/I2PDesktop.java b/apps/desktopgui/src/net/i2p/desktopgui/util/I2PDesktop.java
deleted file mode 100644
index 696088cfb6..0000000000
--- a/apps/desktopgui/src/net/i2p/desktopgui/util/I2PDesktop.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package net.i2p.desktopgui.util;
-
-import java.awt.Desktop;
-import java.awt.Desktop.Action;
-import java.net.URI;
-
-public class I2PDesktop {
-
- public static void browse(String url) throws BrowseException {
- if(Desktop.isDesktopSupported()) {
- Desktop desktop = Desktop.getDesktop();
- if(desktop.isSupported(Action.BROWSE)) {
- try {
- desktop.browse(new URI(url));
- } catch (Exception e) {
- throw new BrowseException();
- }
- }
- else {
- throw new BrowseException();
- }
- }
- else {
- throw new BrowseException();
- }
- }
-}
diff --git a/build.xml b/build.xml
index cfa7ea22f4..e836af31ca 100644
--- a/build.xml
+++ b/build.xml
@@ -388,10 +388,7 @@
-
-
+