views:

57

answers:

1

I'm going to be using ECJ for doing genetic programming and I haven't touched java in years. I'm working on setting up the eclipse environment and I'm catching a few snags.

The ECJ source has several packages, and several sample programs come along with it. I ran one sample program (called tutorial1) by going to the run configurations and adding -file pathToParamsFile to the program arguments. This made it point to the params file of that tutorial and run that sample.

In a new example I am testing (from the package gui) there are TWO params files. I tried pointing to just one param file and a program ran in the console, but there was supposed to be a GUI which did not load.

I'm not sure what I'm doing wrong. Any help would be greaaatly appreciated.

A: 

I think the two parameter files are just different examples.

From the docs (ecj/docs/index.html):

ECJ now has a basic GUI for loading and running jobs from parameter files and checkpoint files, editing parameters, and charting statistics. Try the quick examples in the next section; afterwards, you can try it by running java ec.display.Console. There are certain versions of the examples (in the gui) which, when loaded into the Console, will do charting for you as well.

So instead of

java ec.Evolve

you'll need

java ec.display.Console

The SimpleBarChartStatistics and SimpleXYSeriesChartStatistics classes extend ec.display.chart.BarChartStatistics, which requires JFreeChart. Have you got that jar on your classpath?

John
Awesome. I'm getting a nullpointer exception (From code that came straight from the package, must have set something up wrong) but this is what I needed to know, I think. I wasn't aware that I needed ec.display.Console instead of ec.Evolve. Huuuge thanks cap'n!
Charlie
In any case about my nullpointers, they seem to stem from using the gui. I have JFreeChart, IText and JFreeCommon jars in my classpath. Strange.
Charlie