summaryrefslogtreecommitdiffstats
path: root/src/com/vaadin/launcher
diff options
context:
space:
mode:
authorArtur Signell <artur.signell@itmill.com>2010-01-12 15:56:25 +0000
committerArtur Signell <artur.signell@itmill.com>2010-01-12 15:56:25 +0000
commit0ec3379ac00df225766aedb53072839eefd260f8 (patch)
treef6fa4779ed8235e8b6708aa3c62f94379690dd28 /src/com/vaadin/launcher
parent6490e96cfa722fdc1360bbea16582390d4694ba4 (diff)
downloadvaadin-framework-0ec3379ac00df225766aedb53072839eefd260f8.tar.gz
vaadin-framework-0ec3379ac00df225766aedb53072839eefd260f8.zip
Merged [10696]
svn changeset:10700/svn branch:6.3
Diffstat (limited to 'src/com/vaadin/launcher')
-rw-r--r--src/com/vaadin/launcher/util/BrowserLauncher.java44
1 files changed, 23 insertions, 21 deletions
diff --git a/src/com/vaadin/launcher/util/BrowserLauncher.java b/src/com/vaadin/launcher/util/BrowserLauncher.java
index 9775bdc48e..f30a717cf6 100644
--- a/src/com/vaadin/launcher/util/BrowserLauncher.java
+++ b/src/com/vaadin/launcher/util/BrowserLauncher.java
@@ -35,33 +35,35 @@ public class BrowserLauncher {
// See if the default browser is Konqueror by resolving the symlink.
boolean isDefaultKonqueror = false;
try {
- // Find out the location of the x-www-browser link from path.
- Process process = runtime.exec("which x-www-browser");
- BufferedInputStream ins = new BufferedInputStream(process.getInputStream());
- BufferedReader bufreader = new BufferedReader(new InputStreamReader(ins));
- String defaultLinkPath = bufreader.readLine();
- ins.close();
-
- // The path is null if the link did not exist.
- if (defaultLinkPath != null) {
- // See if the default browser is Konqueror.
- File file = new File(defaultLinkPath);
- String canonical = file.getCanonicalPath();
- if (canonical.indexOf("konqueror") != -1)
- isDefaultKonqueror = true;
- }
+ // Find out the location of the x-www-browser link from path.
+ Process process = runtime.exec("which x-www-browser");
+ BufferedInputStream ins = new BufferedInputStream(process
+ .getInputStream());
+ BufferedReader bufreader = new BufferedReader(
+ new InputStreamReader(ins));
+ String defaultLinkPath = bufreader.readLine();
+ ins.close();
+
+ // The path is null if the link did not exist.
+ if (defaultLinkPath != null) {
+ // See if the default browser is Konqueror.
+ File file = new File(defaultLinkPath);
+ String canonical = file.getCanonicalPath();
+ if (canonical.indexOf("konqueror") != -1)
+ isDefaultKonqueror = true;
+ }
} catch (IOException e1) {
- // The symlink was probably not found, so this is ok.
+ // The symlink was probably not found, so this is ok.
}
// Try x-www-browser, which is symlink to the default browser,
// except if we found that it is Konqueror.
if (!started && !isDefaultKonqueror) {
- try {
- runtime.exec("x-www-browser " + url);
- started = true;
- } catch (final IOException e) {
- }
+ try {
+ runtime.exec("x-www-browser " + url);
+ started = true;
+ } catch (final IOException e) {
+ }
}
// Try firefox