git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-3253-applet headless branch - just experimenting.
[jalview.git]
/
src
/
jalview
/
bin
/
Jalview.java
diff --git
a/src/jalview/bin/Jalview.java
b/src/jalview/bin/Jalview.java
index
fae2b75
..
2752008
100755
(executable)
--- a/
src/jalview/bin/Jalview.java
+++ b/
src/jalview/bin/Jalview.java
@@
-292,6
+292,7
@@
public class Jalview implements ApplicationSingletonI, JalviewJSApi
}
else
{
}
else
{
+ // BH 2019.08.26 cannot pass null
System.setSecurityManager(null);
}
System.setSecurityManager(null);
}
@@
-342,6
+343,9
@@
public class Jalview implements ApplicationSingletonI, JalviewJSApi
|| "true".equals(System.getProperty("java.awt.headless")))
{
headless = true;
|| "true".equals(System.getProperty("java.awt.headless")))
{
headless = true;
+
+ System.out.println("Headless operation detected.");
+
}
// anything else!
}
// anything else!
@@
-398,7
+402,9
@@
public class Jalview implements ApplicationSingletonI, JalviewJSApi
try
{
try
{
- UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
+ UIManager.setLookAndFeel(
+ headless ? "javax.swing.plaf.metal.MetalLookAndFeel"
+ : UIManager.getSystemLookAndFeelClassName());
} catch (Exception ex)
{
System.err.println("Unexpected Look and Feel Exception");
} catch (Exception ex)
{
System.err.println("Unexpected Look and Feel Exception");
@@
-616,7
+622,8
@@
public class Jalview implements ApplicationSingletonI, JalviewJSApi
{
if (!(new File(file)).exists())
{
{
if (!(new File(file)).exists())
{
- System.out.println("Can't find " + file);
+ System.out.println(
+ "Can't find " + new File(file).getAbsolutePath());
if (headless)
{
System.exit(1);
if (headless)
{
System.exit(1);
@@
-753,7
+760,10
@@
public class Jalview implements ApplicationSingletonI, JalviewJSApi
if (aparser.contains(ArgsParser.SHOWOVERVIEW))
{
if (aparser.contains(ArgsParser.SHOWOVERVIEW))
{
- af.overviewMenuItem_actionPerformed(null);
+ if (!headless)
+ {
+ af.overviewMenuItem_actionPerformed(null);
+ }
System.out.println("CMD [showoverview] executed successfully!");
}
System.out.println("CMD [showoverview] executed successfully!");
}