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?

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

4 Comments

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 file
Problem with jcommon .. downloaded another and added it to my buildpath and problem solved.
I did not include jcommon jar in the build path. Thank you for helping!
Thanks a lot. I can't believe this was the part I missed after all this time.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.