git://source.jalview.org
/
jalview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
29bd435
)
JAL-3659 proper headless check; skips setProperty for JS
author
BobHanson
<hansonr@stolaf.edu>
Tue, 16 Jun 2020 23:09:57 +0000
(18:09 -0500)
committer
BobHanson
<hansonr@stolaf.edu>
Tue, 16 Jun 2020 23:09:57 +0000
(18:09 -0500)
src/jalview/bin/Jalview.java
patch
|
blob
|
history
diff --git
a/src/jalview/bin/Jalview.java
b/src/jalview/bin/Jalview.java
index
4522167
..
fea99fb
100755
(executable)
--- a/
src/jalview/bin/Jalview.java
+++ b/
src/jalview/bin/Jalview.java
@@
-20,6
+20,7
@@
*/
package jalview.bin;
*/
package jalview.bin;
+import java.awt.GraphicsEnvironment;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileOutputStream;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileOutputStream;
@@
-327,15
+328,19
@@
public class Jalview implements ApplicationSingletonI
showUsage();
System.exit(0);
}
showUsage();
System.exit(0);
}
- // ?>>
+ // BH note: Only -nodisplay is official; others are deprecated?
if (aparser.contains("nodisplay") || aparser.contains("nogui")
if (aparser.contains("nodisplay") || aparser.contains("nogui")
- || aparser.contains("headless"))
+ || aparser.contains("headless")
+ || GraphicsEnvironment.isHeadless())
{
{
- // BH Is this necessary? Seems like a hack; was removed for applet branch
- System.setProperty("java.awt.headless", "true");
+ if (!isJS) {
+ // BH Definitely not a good idea in JavaScript;
+ // probably should not be here for Java, either.
+ System.setProperty("java.awt.headless", "true");
+ }
headless = true;
}
headless = true;
}
- if ("true".equals(System.getProperty("java.awt.headless")))
+ if (GraphicsEnvironment.isHeadless())
{
headless = true;
}
{
headless = true;
}