Java awt error in Linux


could not initialize class sun.awt.X11.GraphicsEnvironemnt

This is happening while generating the charts. I googled for the solution and found out that setting the property -Djava.awt.headless=true will resolve the issue.

http://www.jfree.org/jfreechart/faq.html#FAQ10
http://java.sun.com/products/java-media/2D/reference/faqs/index.html#Q_I_have_an_application_that_rea

I did this at the application level by adding the System.setProperty(“java.awt.headless”,”true”); This did not work.

Then I added -Djava.awt.headless=true as the system property in WebLogic.ksh or any server. This resolved the issue

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s