Accepted answer

download the zip file from this url and extract it to get the jar. add the jar to your build path. to check the available classes in this jar use this url.

to add this jar to your build path right click the project > build path > configure build path> select libraries tab > click add external libraries > select the jar file download

i hope this will solve your problem


download java-json.jar from here, which contains org.json.jsonarray

nzip and add to your project's library: project > build path > configure build path> select library tab > add external libraries > select the java-json.jar file.


download the json jar from here. this will solve your problem.


on linux pip install library_that_you_need also on help/eclipse marketplace, i add pydev ide for eclipse 7, so when i start a new project i create file/new project/pydev project


download json from java2s website then include in your project. in your class add these package java_basic;

import java.util.iterator;

import org.json.simple.jsonarray;
import org.json.simple.jsonobject;
import org.json.simple.parser.jsonparser;
import org.json.simple.parser.parseexception;


the link of accepted answer is old and can cause warnings with generics use,

you should download latest jar from json-java github site

add jar to java build path

in existing project in order and export tab move the new jar, as json-20180813.jar, as the first (or above other dependencies with jsonobject)


you should take the json implementation from here : .

  • download the *.jar
  • add it to the classpath (right-click on the project, properties->libraries and add new jar.)

Related Query

More Query from same tag