Jbuilder installation help required

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Rohit
Posts: 3
Joined: Fri Jun 04, 2004 12:14 am

Jbuilder installation help required

Post by Rohit » Fri Jun 04, 2004 12:21 am

Hi

I am a newbie and have some basic Java skills. I have been trying to create a project with the source files for jfreechart-0.9.19, for the past 2 days, but have not been successful.

Could someone please give me the steps to create a project using JBuilder 9, like which libraries have to be included and how??

Also for some reason the Ant file does not build the class files. The errors indicate that some java source files cant be found. I guess I have not included the libraries properly

Thanks a lot

Rohit

Mimil
JFreeReport Staff Member
Posts: 69
Joined: Tue Mar 25, 2003 7:33 pm

Post by Mimil » Fri Jun 04, 2004 12:51 am

Hi,

Basicly, you have to include all libraries located in lib/ directory.
Else can you past the output of the error, in that case we can help you better.

Bye,
Mimil

Rohit
Posts: 3
Joined: Fri Jun 04, 2004 12:14 am

Jbuilder- help me

Post by Rohit » Fri Jun 04, 2004 1:49 am

Hi

Thanks for ur reply

My first question is what should the be the name of the project -
As jbuilder requires the project name hierarchy to match the folder hierarchy in the "src" folder - should I name this Jbuilder project as "org"
Besides all the source files have import statements as -
import org.jfree.chart.event.RendererChangeEvent;

When I try adding the source files to this "org" project in Jbuilder, almost all files indicate that they cant find the imported classes -

import org.jfree.chart.event.RendererChangeEvent;
import org.jfree.chart.event.RendererChangeListener;
import org.jfree.chart.labels.ItemLabelAnchor;
import org.jfree.chart.labels.ItemLabelPosition;
import org.jfree.chart.plot.DrawingSupplier;
import org.jfree.chart.plot.PlotOrientation;

Besides which is the source file containing the main class for the entire jfreechart package - I mean the point from where the execution would start.


When I try to use Ant -
If I right click on the "compile" option and select "make", I get many warnings like -

"ValueAxis.java": [javac] C:\Documents and Settings\sahney\Desktop\jfreechart\src\org\jfree\chart\axis\ValueAxis.java:543: warning: translateValueToJava2D(double,java.awt.geom.Rectangle2D,org.jfree.ui.RectangleEdge) in org.jfree.chart.axis.ValueAxis has been deprecated at line 543
[javac] result[0] = (float) this.translateValueToJava2D(tick.getValue(), dataArea, edge);
[javac] ^

"ValueAxis.java": [javac] C:\Documents and Settings\sahney\Desktop\jfreechart\src\org\jfree\chart\axis\ValueAxis.java:1497: warning: translateJava2DToValue(double,java.awt.geom.Rectangle2D,org.jfree.ui.RectangleEdge) in org.jfree.chart.axis.ValueAxis has been deprecated at line 1497
[javac] return translateJava2DToValue(java2DValue, dataArea, edge);
[javac] ^



As a result none of the class files are created - i.e. no build folder, with all the class files, is created.


Thanks

Rohit[/list]

Mimil
JFreeReport Staff Member
Posts: 69
Joined: Tue Mar 25, 2003 7:33 pm

Post by Mimil » Fri Jun 04, 2004 5:07 am

Hi,

I don't realy know JBuilder but i think it works like all java ide. you just have to set the "start point" of your project in src/. In that case org.jfree.chart.* could be seen as OS directories (replacing '.' by '\')

An other thing, if you don't need to change JFreeChart sources you can just include JFreeChart jar (jfreechart-0.9.19.jar) in your project which is compiled src/ directory.

The ant thing, i think that is a missed commit from David.
javadoc wrote: abstract double translateValueToJava2D(double value, java.awt.geom.Rectangle2D area, org.jfree.ui.RectangleEdge edge)
Deprecated. Use valueToJava2D instead.
So just go through sources and change on line 543 and 1497 function translateValueToJava2D to ToJava2D

Bye,
Mimil

Rohit
Posts: 3
Joined: Fri Jun 04, 2004 12:14 am

Post by Rohit » Fri Jun 04, 2004 5:37 am

Hi Mimil

Thanks for your response

But I am still kinda lost. I have not used jar files before - so if I create a new project - "proj1", should I put the jfreechart-0.9.19.jar in -
a lib folder or
the src folder or
the classes folder

secondly how do I invoke it. There are around 400 classes, if I just want to plot a 1 dimensional array against time, which class is to be used and how do I pass the array X as input to the class

Thanks

Rohit

Mimil
JFreeReport Staff Member
Posts: 69
Joined: Tue Mar 25, 2003 7:33 pm

Post by Mimil » Fri Jun 04, 2004 10:21 am

Hi,

jfreechart-0.9.19.jar has to be in libs.
After, just do as in demos, That's easy =)
(go through the demo/ directory located in src/)

Bye,
Mimil

Locked