0

I am trying to use jfreechart - release jfreechart-1.0-2.19 available on the website https://www.jfree.org/jfreechart/download.html

IDE: Eclipse on Mac

Regular java project.

The import fails for pretty much everything in the jar files I tried to add from jfree library.

Eclipse - jfreechart import failure

Added the jar files available under jfreechart-1.0-2.19->lib folder to the project on Eclipse with following steps:

Right Click on Project-> BuildPath-> Configure Build Path -> Libraries -> Add External Jars and added all files in the library folder mentioned above.

Not sure what else can be done and I am unable to resolve.

trashgod
  • 203,806
  • 29
  • 246
  • 1,045
  • [tag:jfreechart] v1.5.4 is current; more [here](https://stackoverflow.com/a/69653678/230513). – trashgod Apr 21 '23 at 08:36
  • If you have a `module-info.java` file, delete it (if needed you can recreate it later via right-click on project and _Configure_) or [in `module-info.java` add the required `requires ...;` statement](https://en.wikipedia.org/wiki/Java_Platform_Module_System#Properties_of_modules) and move the other code into packages. If this does not help, in the _Package Explorer_ expand the `jfreechart-1.0.19.jar` node to show whether there is a `org.jfree.chart` package. – howlger Apr 21 '23 at 11:21
  • Aside: For version 1.0.19, you only need `jfreechart` and `jcommon`, e.g. `java -cp jfreechart-1.0.19.jar:jcommon-1.0.23.jar org.jfree.chart.demo.BarChartDemo1`. – trashgod Apr 21 '23 at 19:16

0 Answers0