[Nix-dev] openjdk cannot run GUI applications in NixOS
Sander van der Burg - EWI
S.vanderBurg at tudelft.nl
Tue Oct 9 14:51:08 CEST 2012
Something like this:
[INFO] --- gwt-maven-plugin:2.4.0:run (default-cli) @ backend-web-admin ---
[INFO] create exploded Jetty webapp in /home/sander/Development/backend/backend-web/backend-web-admin/target/backend-web-admin-1.2-SNAPSHOT
[INFO] auto discovered modules [cc.conferences.backend.adminsite.AdminSite]
[ERROR] java.lang.RuntimeException: Error running on Swing UI thread
[ERROR] at com.google.gwt.dev.SwingUI.invokeAndWait(SwingUI.java:401)
[ERROR] at com.google.gwt.dev.SwingUI.initialize(SwingUI.java:245)
[ERROR] at com.google.gwt.dev.DevModeBase.doStartup(DevModeBase.java:889)
[ERROR] at com.google.gwt.dev.DevMode.doStartup(DevMode.java:424)
[ERROR] at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1058)
[ERROR] at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:811)
[ERROR] at com.google.gwt.dev.DevMode.main(DevMode.java:311)
[ERROR] Caused by: java.lang.reflect.InvocationTargetException
[ERROR] at java.awt.EventQueue.invokeAndWait(EventQueue.java:1242)
[ERROR] at com.google.gwt.dev.SwingUI.invokeAndWait(SwingUI.java:397)
[ERROR] ... 6 more
[ERROR] Caused by: java.lang.NullPointerException
[ERROR] at sun.awt.X11FontManager.getDefaultPlatformFont(X11FontManager.java:779)
[ERROR] at sun.font.SunFontManager$2.run(SunFontManager.java:428)
[ERROR] at java.security.AccessController.doPrivileged(Native Method)
[ERROR] at sun.font.SunFontManager.<init>(SunFontManager.java:371)
[ERROR] at sun.awt.X11FontManager.<init>(X11FontManager.java:32)
[ERROR] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[ERROR] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
[ERROR] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
[ERROR] at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
[ERROR] at java.lang.Class.newInstance0(Class.java:372)
[ERROR] at java.lang.Class.newInstance(Class.java:325)
[ERROR] at sun.font.FontManagerFactory$1.run(FontManagerFactory.java:80)
[ERROR] at java.security.AccessController.doPrivileged(Native Method)
[ERROR] at sun.font.FontManagerFactory.getInstance(FontManagerFactory.java:71)
[ERROR] at sun.font.SunFontManager.getInstance(SunFontManager.java:245)
[ERROR] at sun.font.FontDesignMetrics.getMetrics(FontDesignMetrics.java:264)
[ERROR] at sun.swing.SwingUtilities2.getFontMetrics(SwingUtilities2.java:1012)
[ERROR] at javax.swing.JComponent.getFontMetrics(JComponent.java:1624)
[ERROR] at javax.swing.plaf.basic.BasicLabelUI.getPreferredSize(BasicLabelUI.java:227)
[ERROR] at javax.swing.JComponent.getPreferredSize(JComponent.java:1660)
[ERROR] at javax.swing.plaf.basic.BasicComboBoxRenderer.getPreferredSize(BasicComboBoxRenderer.java:84)
[ERROR] at javax.swing.plaf.basic.BasicListUI.updateLayoutState(BasicListUI.java:1363)
[ERROR] at javax.swing.plaf.basic.BasicListUI.maybeUpdateLayoutState(BasicListUI.java:1311)
[ERROR] at javax.swing.plaf.basic.BasicListUI$Handler.valueChanged(BasicListUI.java:2623)
[ERROR] at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:184)
[ERROR] at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:164)
[ERROR] at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:211)
[ERROR] at javax.swing.DefaultListSelectionModel.changeSelection(DefaultListSelectionModel.java:405)
[ERROR] at javax.swing.DefaultListSelectionModel.changeSelection(DefaultListSelectionModel.java:415)
[ERROR] at javax.swing.DefaultListSelectionModel.setSelectionInterval(DefaultListSelectionModel.java:459)
[ERROR] at javax.swing.JList.setSelectedIndex(JList.java:2212)
[ERROR] at javax.swing.plaf.basic.BasicComboPopup.setListSelection(BasicComboPopup.java:1144)
[ERROR] at javax.swing.plaf.basic.BasicComboPopup.access$300(BasicComboPopup.java:63)
[ERROR] at javax.swing.plaf.basic.BasicComboPopup$Handler.itemStateChanged(BasicComboPopup.java:982)
[ERROR] at javax.swing.JComboBox.fireItemStateChanged(JComboBox.java:1225)
[ERROR] at javax.swing.JComboBox.selectedItemChanged(JComboBox.java:1282)
[ERROR] at javax.swing.JComboBox.contentsChanged(JComboBox.java:1329)
[ERROR] at javax.swing.AbstractListModel.fireContentsChanged(AbstractListModel.java:118)
[ERROR] at javax.swing.DefaultComboBoxModel.setSelectedItem(DefaultComboBoxModel.java:94)
[ERROR] at javax.swing.DefaultComboBoxModel.addElement(DefaultComboBoxModel.java:132)
[ERROR] at javax.swing.JComboBox.addItem(JComboBox.java:718)
[ERROR] at com.google.gwt.dev.shell.ShellMainWindow.<init>(ShellMainWindow.java:189)
[ERROR] at com.google.gwt.dev.SwingUI$3.run(SwingUI.java:258)
[ERROR] at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:241)
[ERROR] at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:705)
[ERROR] at java.awt.EventQueue.access$000(EventQueue.java:101)
[ERROR] at java.awt.EventQueue$3.run(EventQueue.java:666)
[ERROR] at java.awt.EventQueue$3.run(EventQueue.java:664)
[ERROR] at java.security.AccessController.doPrivileged(Native Method)
[ERROR] at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
[ERROR] at java.awt.EventQueue.dispatchEvent(EventQueue.java:675)
[ERROR] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211)
[ERROR] at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
[ERROR] at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
[ERROR] at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
[ERROR] at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
[ERROR] at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
I'm currently trying to invoke GWT stuff from a Maven script. The GWT tool is a GUI application and it tries to communicate with the X server, but it fails somehow. If I override the jdk in Maven to use Oracle's JDK, it works fine and it shows me the GWT Development Mode GUI.
________________________________
From: Shea Levy [shea at shealevy.com]
Sent: Tuesday, October 09, 2012 2:41 PM
To: Sander van der Burg - EWI
Cc: nix-dev at cs.uu.nl
Subject: Re: [Nix-dev] openjdk cannot run GUI applications in NixOS
Hi Sander,
On 10/09/2012 08:39 AM, Sander van der Burg - EWI wrote:
I know that almost nobody uses Java GUI applications nowadays, but I have noticed that I cannot run AWT/Swing applications with OpenJDK (although the Oracle JDK works fine). For example, I cannot run netbeans with OpenJDK.
What error are you seeing?
I have circumvented the issue by utilising Oracle's JDK in the netbeans expression, but it would (of course) be much nicer to use OpenJDK.
I haven't packaged OpenJDK, but perhaps someone knows a solution for it.
Regards,
Sander
_______________________________________________
nix-dev mailing list
nix-dev at lists.science.uu.nl<mailto:nix-dev at lists.science.uu.nl>
http://lists.science.uu.nl/mailman/listinfo/nix-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20121009/04358c0f/attachment-0001.html
More information about the nix-dev
mailing list