Merge branch 'develop' into update/JAL-3949_abstracted_logging_for_jalviewjs_and_sanity
[jalview.git] / src / jalview / util / BrowserLauncher.java
index a55a65c..dbd9177 100755 (executable)
@@ -20,6 +20,8 @@
  */
 package jalview.util;
 
+import jalview.bin.Cache;
+
 import java.io.File;
 import java.io.IOException;
 import java.lang.reflect.Constructor;
@@ -236,9 +238,11 @@ public class BrowserLauncher
 
     loadedWithoutErrors = true;
 
+    if (!Platform.isJS())
     /**
+     * Java only
      * 
-     * @j2sNative
+     * @j2sIgnore
      * 
      */
     {
@@ -334,8 +338,11 @@ public class BrowserLauncher
   private static boolean loadClasses()
   {
 
+    if (!Platform.isJS())
     /**
-     * @j2sNative
+     * Java only
+     * 
+     * @j2sIgnore
      * 
      */
     {
@@ -538,8 +545,11 @@ public class BrowserLauncher
    */
   private static Object locateBrowser()
   {
+    if (!Platform.isJS())
     /**
-     * @j2sNative
+     * Java only
+     * 
+     * @j2sIgnore
      * 
      */
     {
@@ -704,7 +714,7 @@ public class BrowserLauncher
 
     case OTHER:
     default:
-      browser = jalview.bin.Cache.getDefault("DEFAULT_BROWSER", "firefox");
+      browser = Cache.getDefault("DEFAULT_BROWSER", "firefox");
 
       break;
     }
@@ -735,14 +745,17 @@ public class BrowserLauncher
   public static void openURL(String url) throws IOException
   {
 
+    if (Platform.isJS())
+    {
+      Platform.openURL(url);
+      return;
+    }
+    else
     /**
-     * @j2sNative
-     * 
-     *            window.open(url);
-     * 
+     * Java only
      * 
+     * @j2sIgnore
      */
-
     {
 
     if (!loadedWithoutErrors)