aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/sip/communicator/launcher/BrowserLauncher.java
diff options
context:
space:
mode:
authorEmil Ivov <emcho@jitsi.org>2010-09-19 10:56:16 +0000
committerEmil Ivov <emcho@jitsi.org>2010-09-19 10:56:16 +0000
commit1b9ccea1cdd9f92be7e70bcf11f9b1b788d1a919 (patch)
tree38b79c78c6bfa7dc8ee9735e52e988db24cec6f6 /src/net/java/sip/communicator/launcher/BrowserLauncher.java
parent18e06d9f3230de530cd82e8b4ad0a9286b223cfe (diff)
downloadjitsi-1b9ccea1cdd9f92be7e70bcf11f9b1b788d1a919.zip
jitsi-1b9ccea1cdd9f92be7e70bcf11f9b1b788d1a919.tar.gz
jitsi-1b9ccea1cdd9f92be7e70bcf11f9b1b788d1a919.tar.bz2
Ongoing work on the integration of ICE into XMPP. Fixes a problem that was causing our logger not to take into account the home dir configuration property
Diffstat (limited to 'src/net/java/sip/communicator/launcher/BrowserLauncher.java')
-rw-r--r--src/net/java/sip/communicator/launcher/BrowserLauncher.java34
1 files changed, 26 insertions, 8 deletions
diff --git a/src/net/java/sip/communicator/launcher/BrowserLauncher.java b/src/net/java/sip/communicator/launcher/BrowserLauncher.java
index b10a54f..4d231d2 100644
--- a/src/net/java/sip/communicator/launcher/BrowserLauncher.java
+++ b/src/net/java/sip/communicator/launcher/BrowserLauncher.java
@@ -13,28 +13,46 @@ import net.java.sip.communicator.util.*;
/**
* A simple implementation of the BrowserLauncherService. Checks the operating
* system and launches the appropriate browser.
- *
+ *
* @author Yana Stamcheva
*/
public class BrowserLauncher
{
+ /**
+ * Creates a <tt>LaunchBrowser</tt> thread for the specified <tt>url</tt>.
+ *
+ * @param url the url we'd like to launch a browser for.
+ */
public void openURL(String url)
{
new LaunchBrowser(url).start();
}
-
+
/**
* Launch browser in a separate thread.
*/
private static class LaunchBrowser extends Thread
{
+ /**
+ * The URL we'd be launching a browser for.
+ */
private final String url;
-
+
+ /**
+ * Creates a new instance.
+ *
+ * @param url the url we'd like to launch a browser for.
+ */
public LaunchBrowser(String url)
{
this.url = url;
}
-
+
+ /**
+ * On mac, asks FileManager to open the the url, on Windows uses
+ * FileProtocolHandler to do so, on Linux, loops through a list of
+ * known browsers until we find one that seems to work.
+ */
public void run()
{
try
@@ -51,11 +69,11 @@ public class BrowserLauncher
else
{
/* Linux and other Unix systems */
- String[] browsers = {"firefox", "iceweasel", "opera", "konqueror",
- "epiphany", "mozilla", "netscape" };
-
+ String[] browsers = {"firefox", "iceweasel", "opera",
+ "konqueror", "epiphany", "mozilla", "netscape" };
+
String browser = null;
-
+
for (int i = 0; i < browsers.length && browser == null; i ++)
{
if (Runtime.getRuntime().exec(