Nikhil Sahu
Nikhil Sahu

Reputation: 2621

External jar not importing in Eclipse Project

I wish to parse JSON and for that I have downloaded java-json.jar file from this URL. I have added this in Build Path by

  1. Right click on the Project
  2. Build Path -> Configure Build Path -> Add External jars.
  3. Selected the jar and it shows in the "Referenced Libraries"

But import org.json.JSONArray gives me a error. Also when I stop at org. it gives me a few suggestions which does not include json.

What should I do to successfully import the json package?

Upvotes: 3

Views: 7925

Answers (1)

sudipta06
sudipta06

Reputation: 668

Build your project after including the jar.If it doesn't work, check whether the particular class you are looking for is present in the jar file or not.

Upvotes: 1

Related Questions