Neha Choudhary
Neha Choudhary

Reputation: 4870

Package org.json does not exist

I'm making a test project in play framework 2.0.2 and I want to use Json in that. In eclipse I can import the classes of package org.json. But when I compile the project from console by play clean compile, play gives me the error:

package org.json does not exist 
[error] import org.json.JSONArray

json.jar is there in the build path of project and its there in the local and cache repository of play. I tried adding dependency for json as:

"org.json"%"json"%"20080701"

and

"org.json"%%"json"%"20080701"

But it is unresolved and I'm getting the following message:

 http://repo1.maven.org/maven2/org/json/json_2.9.1/20080701/json_2.9.1-20080701.pom
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: org.json#json_2.9.1;20080701: not found

Upvotes: 2

Views: 13246

Answers (1)

Neha Choudhary
Neha Choudhary

Reputation: 4870

changed the dependency as "org.json"%"org.json"%"chargebee-1.0" and got it worked.

Note : Check for the latest version on :Maven org.json repo

Upvotes: 4

Related Questions