JAL-3056 suppress menu options, and repoint Help, for JalviewJS
[jalview.git] / src / jalview / bin / Jalview.java
index e890cb8..3e6e545 100755 (executable)
@@ -89,13 +89,21 @@ public class Jalview
 
   public static AlignFrame currentAlignFrame;
 
-  public static boolean isJS = /** @j2sNative true || */ // BH 2018
-          false;
+  /**
+   * 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 (!isJS())
     { // BH 2018
     // grab all the rights we can the JVM
     Policy.setPolicy(new Policy()
@@ -199,7 +207,7 @@ public class Jalview
   void doMain(String[] args)
   {
 
-    if (!isJS)
+    if (!isJS())
     {
       System.setSecurityManager(null);
     }
@@ -530,7 +538,7 @@ public class Jalview
       }
       System.out.println("CMD [-open " + file + "] executed successfully!");
 
-      if (!isJS && !file.startsWith("http://"))
+      if (!isJS() && !file.startsWith("http://"))
       {
         if (!(new File(file)).exists())
         {