I use Hudson ( http://hudson-ci.org/ ) for compile, gerenate jars and execute my JUnits tests. Hudson runs in a Tomcat application server, and for execute JUnittest it trigger a Ant's target.
But I'm having problems when my JUnits tests tries open JFrames.
When the test tries open a JFrame using the parameter java.awt.headless=true is throw the following exception:
java.awt.HeadlessException at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:159)
If I remove the parameter that I had passed before, the exception thrown is :
java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11GraphicsEnvironment
Could not initialize class sun.awt.X11GraphicsEnvironment
I don't figure out what I'm doing wrong. Someone have a tip?
I was forgetting something, the application is running on Ubuntu Server.