title: A demo example with JFreechart compile time error ?
body: <p>I have this code i'd like to compile , but it refuses to compile , clearly i'm missing a step.</p>
  
  <p>I compile the code below as follow:</p>
  
  <pre><code>javac -cp .:jcommon-1.0.0.jar:jfreechart-1.0.1.jar App.java
  </code></pre>
  
  <p>The compile error basically:</p>
  
  <p>cannot find org.jfree.data.xy.DefaultXYDataset
  and precisely DefaultXYDataset.</p>
  
  <pre><code>import java.util.HashSet;
  
  import javax.swing.JFrame;
  import javax.swing.SwingUtilities;
  
  import org.jfree.chart.ChartFactory;
  import org.jfree.chart.ChartPanel;
  import org.jfree.chart.JFreeChart;
  import org.jfree.chart.plot.PlotOrientation;
  import org.jfree.data.xy.DefaultXYDataset;
  import org.jfree.data.xy.XYDataset;
  
      public class App {
  
          public static void main(String[] args) {
  
              SwingUtilities.invokeLater(new Runnable() {
                  public void run() {
                      JFrame frame = new JFrame("Charts");
  
                      frame.setSize(600, 400);
                      frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                      frame.setVisible(true);
  
                      XYDataset ds = createDataset();
                      JFreeChart chart = ChartFactory.createXYLineChart("Test Chart",
                              "x", "y", ds, PlotOrientation.VERTICAL, true, true,
                              false);
  
                      ChartPanel cp = new ChartPanel(chart);
  
                      frame.getContentPane().add(cp);
                  }
              });
  
          }
  
          private static XYDataset createDataset() {
  
              DefaultXYDataset ds = new DefaultXYDataset();
  
              double[][] data = { {0.1, 0.2, 0.3}, {1, 2, 3} };
  
              ds.addSeries("series1", data);
  
              return ds;
          }
  
      }
  </code></pre>
  
  <p>What am i missing here ?</p>