Why wont it compile?!

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

Why wont it compile?!

Post by Martin » Mon Aug 26, 2002 9:21 pm

Hi,

I been trying various settings for ages and nothing will enable me to compile the JFreeChartDemo.java file.

I'm running Windows 2k. This is my classpath: -

.;C:\jdk1.3\jre\lib\rt.jar;C:\jdk1.3\jre\lib\i18n.jar;C:\jdk1.3\lib\dt.jar;C:\jdk1.3\lib\tools.jar;C:\jcommon-0.6.4.jar;C:\jfreechart-0.9.2.jar;C:\jfreechart-0.9.2-demo.jar;

This is my path: -

%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%JAVA_HOME%\bin;

I can compile ordinary .java files but none of the JFreeChart demo files. I can however run a demo file if I list the classpaths explicitly: -

java -classpath C:\jcommon-0.6.4.jar;C:\jfreechart-0.9.2.jar;C:\jfreechart-0.9.2-demo.jar com.jrefinery.chart.demo.JFreeChartDemo

however, if I try and compile a file in the same way using this method: -

javac -classpath C:\jdk1.3\jre\lib\rt.jar;C:\jdk1.3\jre\lib\i18n.jar;C:\jdk1.3\lib\dt.jar;C:\jdk1.3\lib\tools.jar;C:\jcommon-0.6.4.jar;C:\jfreechart-0.9.2.jar;C:\jfreechart-0.9.2-demo.jar JFreeChartDemo.java

it doesn't work.

I'm completely baffled as to why it isn't working. Got any ideas?

Martin

Re: Why wont it compile?!

Post by Martin » Mon Aug 26, 2002 9:25 pm

i forgot to add. these are the errors i am receiving:-

C:\JFreeChartDemo.java:9: package com.jrefinery.chart.combination does not exist
import com.jrefinery.chart.combination.*;
^
C:\JFreeChartDemo.java:13: cannot resolve symbol
symbol : class JRefineryUtilities
location: package ui
import com.jrefinery.ui.JRefineryUtilities;
^
C:\JFreeChartDemo.java:20: cannot resolve symbol
symbol : class JFreeChartFrame
location: class JFreeChartDemo
private JFreeChartFrame verticallyCombinedChartFrame;
^
C:\JFreeChartDemo.java:52: cannot resolve symbol
symbol : variable DemoDatasetFactory
location: class JFreeChartDemo
PlotFit pf = new PlotFit(DemoDatasetFactory.createTimeSeriesCollection2(), mavg);
^
C:\JFreeChartDemo.java:58: cannot resolve symbol
symbol : variable DemoDatasetFactory
location: class JFreeChartDemo
data.add(DemoDatasetFactory.createSampleHighLowDataset()); // high-low data
^
C:\JFreeChartDemo.java:90: cannot resolve symbol
symbol : class CombinedPlot
location: class JFreeChartDemo
CombinedPlot combinedPlot = new CombinedPlot(timeAxis, CombinedPlot.VERTICAL);
^
C:\JFreeChartDemo.java:90: cannot resolve symbol
symbol : class CombinedPlot
location: class JFreeChartDemo
CombinedPlot combinedPlot = new CombinedPlot(timeAxis, CombinedPlot.VERTICAL);
^
C:\JFreeChartDemo.java:90: cannot resolve symbol
symbol : variable CombinedPlot
location: class JFreeChartDemo
CombinedPlot combinedPlot = new CombinedPlot(timeAxis, CombinedPlot.VERTICAL);
^
C:\JFreeChartDemo.java:91: cannot resolve symbol
symbol : class CombinedChart
location: class JFreeChartDemo
CombinedChart chartToCombine;
^
C:\JFreeChartDemo.java:94: cannot resolve symbol
symbol : method createCombinableXYChart (com.jrefinery.chart.ValueAxis,com.jrefinery.chart.NumberAxis,com.jrefinery.data.CombinedDataset)
location: class com.jrefinery.chart.ChartFactory
chartToCombine = ChartFactory.createCombinableXYChart(timeAxis, valueAxis[0], data0);
^
C:\JFreeChartDemo.java:98: cannot resolve symbol
symbol : method createCombinableTimeSeriesChart (com.jrefinery.chart.ValueAxis,com.jrefinery.chart.NumberAxis,com.jrefinery.data.CombinedDataset)
location: class com.jrefinery.chart.ChartFactory
chartToCombine = ChartFactory.createCombinableTimeSeriesChart(timeAxis, valueAxis[1], data1);
^
C:\JFreeChartDemo.java:102: cannot resolve symbol
symbol : method createCombinableHighLowChart (com.jrefinery.chart.ValueAxis,com.jrefinery.chart.NumberAxis,com.jrefinery.data.CombinedDataset)
location: class com.jrefinery.chart.ChartFactory
chartToCombine = ChartFactory.createCombinableHighLowChart(timeAxis, valueAxis[2], data2);
^
C:\JFreeChartDemo.java:106: cannot resolve symbol
symbol : method createCombinableVerticalXYBarChart (com.jrefinery.chart.ValueAxis,com.jrefinery.chart.NumberAxis,com.jrefinery.data.CombinedDataset)
location: class com.jrefinery.chart.ChartFactory
chartToCombine = ChartFactory.createCombinableVerticalXYBarChart(timeAxis, valueAxis[3], data0);
^
C:\JFreeChartDemo.java:121: cannot resolve symbol
symbol : class JFreeChartFrame
location: class JFreeChartDemo
verticallyCombinedChartFrame = new JFreeChartFrame(title, chart);
^
C:\JFreeChartDemo.java:123: cannot resolve symbol
symbol : variable JRefineryUtilities
location: class JFreeChartDemo
JRefineryUtilities.positionFrameRandomly(verticallyCombinedChartFrame);
^
15 errors

David Gilbert

Re: Why wont it compile?!

Post by David Gilbert » Mon Aug 26, 2002 10:23 pm

It looks like you have an older version of JFreeChart lying around somewhere. JRefineryUtilities has been renamed RefineryUtilities, and the com.jrefinery.chart.combination package has been removed, in the latest release.

Regards,

DG.

Martin

Re: Why wont it compile?!

Post by Martin » Mon Aug 26, 2002 10:26 pm

LOL

oh yeah! Works fine now. Thanks David

Locked