[Jmol-developers] Do we need to initialize the graphics environment when Jmol is running headless?
I've been working on using 12.0.45 as a server-side static graphics engine for the SageMath group. I've run into the following problem. The server does not run in an X-session, so there is no graphics environment. This causes an error when Jmol is run as Jmol.jar -ionx. The error seems to imply that we are still initializing the look-and-feel, even when there is no GUI. Is there any reason we can't switch this off? Here's the error: Exception in thread main java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11GraphicsEnvironment at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:186) at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnviron\ ment.java:82) at sun.awt.X11.XToolkit.clinit(XToolkit.java:112) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:186) at java.awt.Toolkit$2.run(Toolkit.java:849) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:841) at sun.swing.SwingUtilities2$AATextInfo.getAATextInfo(SwingUtilities2.java:\ 121) at javax.swing.plaf.metal.MetalLookAndFeel.initComponentDefaults(MetalLookA\ ndFeel.java:1564) at javax.swing.plaf.basic.BasicLookAndFeel.getDefaults(BasicLookAndFeel.jav\ a:147) at javax.swing.plaf.metal.MetalLookAndFeel.getDefaults(MetalLookAndFeel.jav\ a:1599) at javax.swing.UIManager.setLookAndFeel(UIManager.java:530) at javax.swing.UIManager.setLookAndFeel(UIManager.java:570) at javax.swing.UIManager.initializeDefaultLAF(UIManager.java:1320) at javax.swing.UIManager.initialize(UIManager.java:1407) at javax.swing.UIManager.maybeInitialize(UIManager.java:1395) at javax.swing.UIManager.getDefaults(UIManager.java:644) at javax.swing.UIManager.put(UIManager.java:973) at org.jmol.export.dialog.Dialog.setupUIManager(Unknown Source) at org.openscience.jmol.app.jmolpanel.JmolPanel.startJmol(Unknown Source) at org.openscience.jmol.app.Jmol.main(Unknown Source) Dr. Jonathan H. Gutow Chemistry Departmentgu...@uwosh.edu UW-Oshkosh Office: 920-424-1326 800 Algoma BoulevardFAX:920-424-2042 Oshkosh, WI 54901 http://www.uwosh.edu/facstaff/gutow -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Jmol-developers mailing list Jmol-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-developers
Re: [Jmol-developers] Do we need to initialize the graphics environment when Jmol is running headless?
Is this because of the try{...} at line 513 of JmolPanel.java? Shouldn't this be inside the preceding if..., which checks to see if the display and splash are enabled? Jonathan On Mar 17, 2012, at 8:38 AM, Jonathan Gutow wrote: I've been working on using 12.0.45 as a server-side static graphics engine for the SageMath group. I've run into the following problem. The server does not run in an X-session, so there is no graphics environment. This causes an error when Jmol is run as Jmol.jar -ionx. The error seems to imply that we are still initializing the look-and-feel, even when there is no GUI. Is there any reason we can't switch this off? Here's the error: Exception in thread main java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11GraphicsEnvironment at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:186) at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnviron\ ment.java:82) at sun.awt.X11.XToolkit.clinit(XToolkit.java:112) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:186) at java.awt.Toolkit$2.run(Toolkit.java:849) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:841) at sun.swing.SwingUtilities2$AATextInfo.getAATextInfo(SwingUtilities2.java:\ 121) at javax.swing.plaf.metal.MetalLookAndFeel.initComponentDefaults(MetalLookA\ ndFeel.java:1564) at javax.swing.plaf.basic.BasicLookAndFeel.getDefaults(BasicLookAndFeel.jav\ a:147) at javax.swing.plaf.metal.MetalLookAndFeel.getDefaults(MetalLookAndFeel.jav\ a:1599) at javax.swing.UIManager.setLookAndFeel(UIManager.java:530) at javax.swing.UIManager.setLookAndFeel(UIManager.java:570) at javax.swing.UIManager.initializeDefaultLAF(UIManager.java:1320) at javax.swing.UIManager.initialize(UIManager.java:1407) at javax.swing.UIManager.maybeInitialize(UIManager.java:1395) at javax.swing.UIManager.getDefaults(UIManager.java:644) at javax.swing.UIManager.put(UIManager.java:973) at org.jmol.export.dialog.Dialog.setupUIManager(Unknown Source) at org.openscience.jmol.app.jmolpanel.JmolPanel.startJmol(Unknown Source) at org.openscience.jmol.app.Jmol.main(Unknown Source) Dr. Jonathan H. Gutow Chemistry Departmentgu...@uwosh.edu UW-Oshkosh Office: 920-424-1326 800 Algoma BoulevardFAX:920-424-2042 Oshkosh, WI 54901 http://www.uwosh.edu/facstaff/gutow -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Jmol-developers mailing list Jmol-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-developers Dr. Jonathan H. Gutow Chemistry Departmentgu...@uwosh.edu UW-Oshkosh Office: 920-424-1326 800 Algoma BoulevardFAX:920-424-2042 Oshkosh, WI 54901 http://www.uwosh.edu/facstaff/gutow -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Jmol-developers mailing list Jmol-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-developers
Re: [Jmol-developers] Do we need to initialize the graphics environment when Jmol is running headless?
You can't run it without graphics if you are going to create JPG files. . If you are doing something else, you can use JmolData.jar, which has no graphics. On Sat, Mar 17, 2012 at 8:38 AM, Jonathan Gutow gu...@uwosh.edu wrote: I've been working on using 12.0.45 as a server-side static graphics engine for the SageMath group. I've run into the following problem. The server does not run in an X-session, so there is no graphics environment. This causes an error when Jmol is run as Jmol.jar -ionx. The error seems to imply that we are still initializing the look-and-feel, even when there is no GUI. Is there any reason we can't switch this off? Here's the error: Exception in thread main java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11GraphicsEnvironment at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:186) at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnviron\ ment.java:82) at sun.awt.X11.XToolkit.clinit(XToolkit.java:112) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:186) at java.awt.Toolkit$2.run(Toolkit.java:849) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:841) at sun.swing.SwingUtilities2$AATextInfo.getAATextInfo(SwingUtilities2.java:\ 121) at javax.swing.plaf.metal.MetalLookAndFeel.initComponentDefaults(MetalLookA\ ndFeel.java:1564) at javax.swing.plaf.basic.BasicLookAndFeel.getDefaults(BasicLookAndFeel.jav\ a:147) at javax.swing.plaf.metal.MetalLookAndFeel.getDefaults(MetalLookAndFeel.jav\ a:1599) at javax.swing.UIManager.setLookAndFeel(UIManager.java:530) at javax.swing.UIManager.setLookAndFeel(UIManager.java:570) at javax.swing.UIManager.initializeDefaultLAF(UIManager.java:1320) at javax.swing.UIManager.initialize(UIManager.java:1407) at javax.swing.UIManager.maybeInitialize(UIManager.java:1395) at javax.swing.UIManager.getDefaults(UIManager.java:644) at javax.swing.UIManager.put(UIManager.java:973) at org.jmol.export.dialog.Dialog.setupUIManager(Unknown Source) at org.openscience.jmol.app.jmolpanel.JmolPanel.startJmol(Unknown Source) at org.openscience.jmol.app.Jmol.main(Unknown Source) Dr. Jonathan H. Gutow Chemistry Departmentgu...@uwosh.edu UW-Oshkosh Office: 920-424-1326 800 Algoma BoulevardFAX:920-424-2042 Oshkosh, WI 54901 http://www.uwosh.edu/facstaff/gutow -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Jmol-developers mailing list Jmol-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-developers -- Robert M. Hanson Professor of Chemistry St. Olaf College 1520 St. Olaf Ave. Northfield, MN 55057 http://www.stolaf.edu/people/hansonr phone: 507-786-3107 If nature does not answer first what we want, it is better to take what answer we get. -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900 -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure___ Jmol-developers mailing list Jmol-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-developers