update HtmlSvgOutput to ignore browser invocation when running in headless mode features/JAL-1605_html-svg-export
authorCharles Ofoegbu <tcnofoegbu@dundee.ac.uk>
Mon, 15 Dec 2014 15:35:54 +0000 (15:35 +0000)
committerCharles Ofoegbu <tcnofoegbu@dundee.ac.uk>
Mon, 15 Dec 2014 15:35:54 +0000 (15:35 +0000)
src/jalview/io/HtmlSvgOutput.java

index 4793ac4..68f9924 100644 (file)
@@ -105,8 +105,11 @@ public class HtmlSvgOutput
       out.write(htmlData.getBytes());
       out.flush();
       out.close();
-
+      if (!(System.getProperty("java.awt.headless") != null && System
+              .getProperty("java.awt.headless").equals("true")))
+      {
       jalview.util.BrowserLauncher.openURL("file:///" + file);
+      }
     } catch (Exception e)
     {
       e.printStackTrace();