JFreeChart: no such method error despite having loaded the library

流过昼夜 提交于 2019-12-13 00:39:17

问题


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" />

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!


回答1:


Note that JCommon classes have been integrated into JFreeChart version 1.5.

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.



来源:https://stackoverflow.com/questions/53137373/jfreechart-no-such-method-error-despite-having-loaded-the-library

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