BarRenderer barrenderer = (BarRenderer) plot.getRenderer(); 
DecimalFormat decimalformat1 = new DecimalFormat("### %");
barrenderer.setItemLabelGenerator (new StandardCategoryItemLabelGenerator("{2}",decimalformat1)); 
barrenderer.setItemLabelFont (new Font ("Bold", Font.PLAIN, 12)); 
barrenderer.setItemLabelsVisible (true);

In eclipse I got the StandardCategoryItemLabelGenerator cannot be resolved to a type
in the below line StandardCategoryItemLabelGenerator
I import import org.jfree.chart.labels.StandardCategoryItemLabelGenerator;
there also i can get redline below of this import statement

If it's redlined the import then Eclipse can't find that class - check your classpaths and project settings to ensure the class is findable. The "cannot be resolved" error follows on from this one.