Problem implementing JFreeChart
Asked Answered
O

1

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

Anyone a idea how to fix it?

Originate answered 27/5, 2011 at 13:2 Comment(0)
S
19

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

Swayne answered 27/5, 2011 at 13:6 Comment(3)
In fact I did miss that jar but it doesn't solve the problem ... I have a problem with this import now : import org.jfree.chart.JFreeChart; and a error message : The import org.jfree.chart.JFreeChart conflicts with a type defined in the same fileOriginate
Problem with jcommon .. downloaded another and added it to my buildpath and problem solved.Originate
I did not include jcommon jar in the build path. Thank you for helping!Bisque

© 2022 - 2024 — McMap. All rights reserved.