Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Problem implementing JFreeChart

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?

like image 587
Darth Blue Ray Avatar asked May 27 '11 13:05

Darth Blue Ray


1 Answers

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.

like image 129
Ernest Friedman-Hill Avatar answered Sep 17 '22 11:09

Ernest Friedman-Hill