Skip to content

How can I import javax.json in eclipse

I have installed eclipse ide for EE developers and I am receiving an import error for

import javax.json.Json;
import javax.json.JsonReader;

I have right clicked on project folder -> clicked properties -> clicked Java build path -> add library -> JRE System Library,

but the dependencies that show up are already imported. How can I import the javax.json package?


If using Maven, add this dependency to your pom.xml


For Gradle, add this to your build.gradle

compile 'javax.json:javax.json-api:1.0'