/**
* Main class for Jalview Application <br>
* <br>
- * 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$
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()
void doMain(String[] args)
{
- if (!isJS)
+ if (!isJS())
{
System.setSecurityManager(null);
}
{
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);
}
}
System.out.println("CMD [-open " + file + "] executed successfully!");
- if (!isJS && !file.startsWith("http://"))
+ if (!isJS() && !file.startsWith("http://"))
{
if (!(new File(file)).exists())
{