Mohamed Ali Benmansour
Mohamed Ali Benmansour

Reputation: 343

Error import library JFreeChart (java)

I'm trying to make a java application, I need to use JFreeChart library and I impoort it but an error is displayed :

Caused by: java.lang.RuntimeException: Uncompilable source code - package org.jfree.chart does not exist at testJfreeChart.(testJfreeChart.java:6)

what i should do ?

Upvotes: 0

Views: 1222

Answers (1)

Numbernick
Numbernick

Reputation: 181

I guess you have your imports correct and added the library somehow to your project. Then this sounds like a dependency problem.

I would suggest using Maven as a basic tool for dependency management. It's easy to use and helps you with all the hustle you come across. I don't know what IDE you're using. But if it's Eclipse, just add a pom.xml to you project base, convert your project to a Maven Project (right-clicking -> convert -> Maven) and add the jFreeChart dependency. Maven will download the depencies and everything is done :)

Maven basic pom:
https://maven.apache.org/pom.html#The_Basics
Maven repo link:
http://mvnrepository.com/artifact/org.jfree/jfreechart

Upvotes: 2

Related Questions