Linux/Unix环境中的JfreeChart错误 [英] JfreeChart Error in Linux/Unix environment

查看:37
本文介绍了Linux/Unix环境中的JfreeChart错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Linux环境中在Web浏览器上显示3D饼图时遇到此错误.在Windows环境中,它工作得很好.

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)


我已经设置了系统属性System.setProperty("java.awt.headless","true");在我的Java代码中. 在检查该属性时,已成功将其设置为true. 但是我仍然遇到相同的错误.


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.

推荐答案

我怀疑您的Linux服务器无头运行.请参见 在Java SE平台中使用无头模式 ,以及与此相关的论坛

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

这篇关于Linux/Unix环境中的JfreeChart错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆