java 实现 JFreeChart 的问题

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6152593/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-30 14:34:26  来源:igfitidea点击:

Problem implementing JFreeChart

javajfreechart

提问by Darth Blue Ray

DefaultPieDataset myColoredPieChart = new DefaultPieDataset();                
     myColoredPieChart.setValue("Java", 12.9);    
     .......
     org.jfree.chart.JFreeChart myColoredChart=ChartFactory.createPieChart("Programming - Colored Pie Chart Example",myColoredPieChart,true,true,false);    

I get a error "The type org.jfree.util.PublicCloneable cannot be resolved. It is indirectly referenced from required .class files"

我收到错误消息“无法解析类型 org.jfree.util.PublicCloneable。它是从所需的 .class 文件间接引用的”

Anyone a idea how to fix it?

任何人都知道如何解决它?

回答by Ernest Friedman-Hill

JFreeChart is packaged as multiple jar files; you're probably not including all of them in your program. The one named jcommon-XXX.jarcontains the class that's missing, so be sure to inclide that one in your program.

JFreeChart 被打包成多个 jar 文件;您可能没有将所有这些都包含在您的程序中。命名的jcommon-XXX.jar包含缺少的类,因此请确保在您的程序中包含该类。