j2sNative references moved to Platform
[jalview.git] / src / jalview / bin / JalviewJS.java
index d7c4d19..70430ad 100644 (file)
@@ -102,21 +102,9 @@ public class JalviewJS
 
   public static AlignFrame currentAlignFrame;
 
-  /**
-   * Answers true if Jalview is running as Javascript, else false. The value is
-   * set at compile time.
-   * 
-   * @return
-   */
-  public static boolean isJS()
-  {
-    return /** @j2sNative true || */
-    false;
-  }
-
   static
   {
-    if (!isJS())
+    if (!Platform.isJS())
     { // BH 2018
     // grab all the rights we can the JVM
     Policy.setPolicy(new Policy()
@@ -211,7 +199,9 @@ public class JalviewJS
   public static void main(String[] args)
   {
     instance = new JalviewJS();
-    instance.doMain(new String[] {"open","http://www.jalview.org/examples/uniref50.fa", "-features","http://www.jalview.org/examples/exampleFeatures.txt"});
+    instance.doMain(
+               Platform.isJS() ? new String[0] 
+                               : new String[] {"open","http://www.jalview.org/examples/uniref50.fa", "-features","http://www.jalview.org/examples/exampleFeatures.txt"});
 }
 
   private static void logClass(String name) 
@@ -249,7 +239,7 @@ public class JalviewJS
   void doMain(String[] args)
   {
 
-    if (!isJS())
+    if (!Platform.isJS())
     {
       System.setSecurityManager(null);
     }
@@ -589,7 +579,7 @@ public class JalviewJS
       }
       System.out.println("CMD [-open " + file + "] executed successfully!");
 
-      if (!isJS() && !file.startsWith("http://"))
+      if (!Platform.isJS() && !file.startsWith("http://"))
       {
         if (!(new File(file)).exists())
         {