java.lang.NoClassDefFoundError ???

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Toni Kivinen

java.lang.NoClassDefFoundError ???

Post by Toni Kivinen » Mon Oct 30, 2000 12:04 pm

java.lang.NoClassDefFoundError: com/jrefinery/chart

appears when I try to run my G2D Application ( class G2D).

Please help me to fix this problem, It's URGENT.........

Thanks in advance.

Here is the code:


import java.lang.Number;
import java.lang.Integer;
import javax.swing.JFrame;
import com.jrefinery.chart.JFreeChart;
import com.jrefinery.chart.JFreeChartPanel;
import com.jrefinery.chart.DataSource;
import com.jrefinery.chart.CategoryDataSource;
import com.jrefinery.chart.DefaultCategoryDataSource;

public class G2D {

public static void main(String args[]) {

Number[][] data = new Integer[][]{
{new Integer(12274123),new Integer(14234255),
new Integer(12274123),new Integer(15976234) },

{new Integer(25126782),new Integer(12212523),
new Integer(14785123),new Integer(13334123) },

{new Integer(12265123),new Integer(12274123),
new Integer(26874123),new Integer(11274123) }
};

CategoryDataSource myDataSource = new DefaultCategoryDataSource(data);


JFreeChart myChart = JFreeChart.createVerticalBarChart(myDataSource);

JFreeChartPanel myPanel = new JFreeChartPanel(myChart);

JFrame frame = new JFrame();

frame.add(myPanel);

}

}

David Gilbert

RE: java.lang.NoClassDefFoundError ???

Post by David Gilbert » Tue Oct 31, 2000 12:12 am

You are having trouble with your classpath...there is some information about this in the appendix of the JFreeChart documentation (a separate download on the JFreeChart page) or you can try:

http://java.sun.com/products/jdk/1.2/do ... spath.html

and

http://java.sun.com/products/jdk/1.2/do ... spath.html

...where it is all explained.

Regards,

DG.

Locked