X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fbin%2FJalview.java;h=37f396eb842d5d6a204ee8279559c200dba18460;hb=fc895e8dacdbb7f49df0ec5c9f475b841082e9b3;hp=0d7143dcca095f12842be7fed11f90f2ee60c07a;hpb=e6fd516209d8b5162cd155c9d500ca27a6dd8e1e;p=jalview.git diff --git a/src/jalview/bin/Jalview.java b/src/jalview/bin/Jalview.java index 0d7143d..37f396e 100755 --- a/src/jalview/bin/Jalview.java +++ b/src/jalview/bin/Jalview.java @@ -70,7 +70,14 @@ import groovy.util.GroovyScriptEngine; /** * Main class for Jalview Application
*
- * start with java -Djava.ext.dirs=$PATH_TO_LIB$ jalview.bin.Jalview + * start with: java -classpath "$PATH_TO_LIB$/*:$PATH_TO_CLASSES$" \ + * jalview.bin.Jalview + * + * or on Windows: java -classpath "$PATH_TO_LIB$/*;$PATH_TO_CLASSES$" \ + * jalview.bin.Jalview jalview.bin.Jalview + * + * (ensure -classpath arg is quoted to avoid shell expansion of '*' and do not + * embellish '*' to e.g. '*.jar') * * @author $author$ * @version $Revision$ @@ -89,13 +96,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() @@ -160,7 +175,6 @@ public class Jalview af.setProgressBar(MessageManager .getString("status.das_features_being_retrived"), id); af.featureSettings_actionPerformed(null); - af.featureSettings.fetchDasFeatures(dasSources, true); af.setProgressBar(null, id); synchronized (us) { @@ -200,7 +214,7 @@ public class Jalview void doMain(String[] args) { - if (!isJS) + if (!isJS()) { System.setSecurityManager(null); } @@ -288,7 +302,7 @@ public class Jalview { error.printStackTrace(); System.out.println("\nEssential logging libraries not found." - + "\nUse: java -Djava.ext.dirs=$PATH_TO_LIB$ jalview.bin.Jalview"); + + "\nUse: java -classpath \"$PATH_TO_LIB$/*:$PATH_TO_CLASSES$\" jalview.bin.Jalview"); System.exit(0); } @@ -531,7 +545,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()) { @@ -750,7 +764,8 @@ public class Jalview continue; } - if (af.saveAlignment(file, format)) + af.saveAlignment(file, format); + if (af.isSaveAlignmentSuccessful()) { System.out.println("Written alignment in " + format + " format to " + file);