Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm trying to run a shell in a Unix Server and send the display in graphical mode to a workstatio, I'm seting the DISPLAY variable as $export DISPLAY=<IPADREES:0.0> where the IP Address is my workstation, but in the server I'm receiving the following error message:

 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:173)
        at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:68)
        at sun.awt.X11.XToolkit.<clinit>(XToolkit.java:89)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:173)
        at java.awt.Toolkit$2.run(Toolkit.java:835)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:827)
        at sun.swing.SwingUtilities2$AATextInfo.getAATextInfo(SwingUtilities2.java:128)
        at javax.swing.plaf.metal.MetalLookAndFeel.initComponentDefaults(MetalLookAndFeel.java:1556)
        at javax.swing.plaf.basic.BasicLookAndFeel.getDefaults(BasicLookAndFeel.java:130)
        at javax.swing.plaf.metal.MetalLookAndFeel.getDefaults(MetalLookAndFeel.java:1591)
        at javax.swing.UIManager.setLookAndFeel(UIManager.java:545)
        at javax.swing.UIManager.setLookAndFeel(UIManager.java:585)
        at com.infy.fintools.ui.APDM_Screen.main(Unknown Source)

I found this solution

Exception on Desktop[sic!] sun.awt.X11GraphicsEnvironment

But It was created a few years ago, so I try to apply the solution, didn't work.

My Ubuntu workstation has the openJDK Java6

Any Ideas?


share|improve this question
Please can you update your question with the exact commands you are trying to run? And exactly what did you do to apply the solution from the linked question? –  David Edwards Apr 4 '14 at 12:18
Hi David! These are the steps: .- Start a session in the Unix server. .- move to an specific directory .- type "export DISPLAY= .- type "./apdm.sh" Starts to run the shell and a few seconds later I receive the error message. The shell launches a Java application, if I run this into a windows workstation, this shows me the main screen of the application. –  Rafael Casabal Apr 9 '14 at 17:57

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.