added a couple of debug statements for unix browser launching problems.
[jalview.git] / src / jalview / util / BrowserLauncher.java
index 685e92f..5404c77 100755 (executable)
@@ -469,8 +469,8 @@ public class BrowserLauncher {
                         default:
                                 browser = jalview.bin.Cache.applicationProperties.getProperty("jalview.browser");
                                 if (browser==null) {
-                                  // hope netscape exists :-/
-                                  browser = "netscape";
+                                  // hope firefox exists :-/
+                                  browser = "firefox";
                                 }
                                 break;
                 }
@@ -561,10 +561,19 @@ public class BrowserLauncher {
                                 }
                                 break;
                         case OTHER:
-                                // Assume that we're on Unix and that Netscape is installed
+                                // Assume that we're on Unix and that Netscape (actually Firefox) is installed
 
                                 // First, attempt to open the URL in a currently running session of Netscape
-                                process = Runtime.getRuntime().exec(new String[] { (String) browser,
+
+                        // JBPNote log debug
+    /* System.out.println("Executing : "+browser+" "+
+                                                                                                        NETSCAPE_REMOTE_PARAMETER+" "+
+                                                                                                        NETSCAPE_OPEN_PARAMETER_START +
+                                                                                                        url +
+                                                                                                        NETSCAPE_OPEN_NEW_WINDOW +
+                                                                                                        NETSCAPE_OPEN_PARAMETER_END);
+     */
+                            process = Runtime.getRuntime().exec(new String[] { (String) browser,
                                                                                                         NETSCAPE_REMOTE_PARAMETER,
                                                                                                         NETSCAPE_OPEN_PARAMETER_START +
                                                                                                         url +
@@ -573,7 +582,9 @@ public class BrowserLauncher {
                                 try {
                                         int exitCode = process.waitFor();
                                         if (exitCode != 0) {   // if Netscape was not open
-                                                Runtime.getRuntime().exec(new String[] { (String) browser, url });
+       // JBPNote log debug
+       //       System.out.println("Executing : "+browser+" "+url+"\n");
+       Runtime.getRuntime().exec(new String[] { (String) browser, url });
                                         }
                                 } catch (InterruptedException ie) {
                                         throw new IOException("InterruptedException while launching browser: " + ie.getMessage());