2

I am getting this error in the Linux environment while displaying 3D pie charts on the web browser. It works perfectly fine in the windows environment.

java.lang.NoClassDefFoundError:
Could not initialize class org.jfree.chart.JFreeChart
at org.jfree.chart.ChartFactory.createPieChart3D(ChartFactory.java:763)

I have set the system property System.setProperty("java.awt.headless", "true"); in my java code. On checking the property, it has been set to true successfully. But still i am getting the same error.

1 Answer 1

2

I suspect your Linux server is running headless. See Using Headless Mode in the Java SE Platform, as well as this related forum thread.

Sign up to request clarification or add additional context in comments.

1 Comment

See also createPieChart3D(), and check the servlet container's class path.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.