JfreeChart Error in Linux/Unix environment

大兔子大兔子 提交于 2019-11-27 08:13:52

问题


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:


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



来源:https://stackoverflow.com/questions/7400395/jfreechart-error-in-linux-unix-environment

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!