问题描述
我在Java swing应用程序中使用JFreeChart.我确实指定了库在builder.xml文件中的位置:
I am using JFreeChart in a Java swing application. I did specify where the libraries are in my builder.xml file:
<zipgroupfileset dir="../lib" includes="jfreechart-0.9.21.jar" />
<zipgroupfileset dir="../lib" includes="jcommon-1.0.8.jar" />
我导入了那些库; Eclipse没有显示任何编译错误.但是我在运行代码时得到了这个信息:
I imported those libraries; Eclipse doesn't show any compilation error. But I am getting this when I run the code:
java.lang.NoSuchMethodError: org.jfree.data.xy.XYSeries.<init>(Ljava/lang/Comparable;)V
有人可以帮我弄清楚发生了什么吗?谢谢!
Could someone please help me figure out what's going on? Thank you!
推荐答案
请注意,JCommon
类已集成到JFreeChart
版本1.5 .
Note that JCommon
classes have been integrated into JFreeChart
version 1.5.
从此处下载旧版本时,请确保使用 compatible 版本:例如,最新的JFreeChart
JAR jfreechart-1.0.19
应该与最新的JCommon
JAR jcommon-1.0.23
一起使用.您应该在选择的任何JFreeChart
的lib
文件夹中看到正确的JCommon
JAR.
When downloading old releases from here, be sure to use compatible versions: For example, the latest JFreeChart
JAR, jfreechart-1.0.19
, should be used with the latest JCommon
JAR, jcommon-1.0.23
. You should see the correct JCommon
JAR in the lib
folder of whichever JFreeChart
you choose.
这篇关于JFreeChart:尽管已加载库,但没有此类方法错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!