In my case i was using maven build tool and got this error so had to add below dependency from here like below and error resolved.

<dependency>
    <groupId>org.json</groupId>
    <artifactId>json</artifactId>
    <version>20180130</version>
</dependency>
Answer from Alien on Stack Overflow
🌐
Reddit
reddit.com › r/learnjava › error: package org.json does not exist
r/learnjava on Reddit: error: package org.json does not exist
May 4, 2019 -

I'm parsing json files using JSONArray and JSONObject but I keep getting the error shown in the title. I've downloaded org.json.jar but I don't know what to do next. Currently, org.json.jar sits in the same path as all of the other java files and classes.

Thanks!

Discussions

Package util.json does not exist
Hello I try to test invoice-cmis example with camunda 7.14 (https://github.com/camunda-consulting/code) When I run the command mvn clean package I got the following message : package org.camunda.bpm.engine.impl.util.json does not exist In javadoc I didn’t find it. More on forum.camunda.io
🌐 forum.camunda.io
1
0
November 3, 2020
package does not exist
There was an error while loading. Please reload this page · I am new to Ijava in jupyter More on github.com
🌐 github.com
1
May 14, 2020
package org.json no longer automatically included into the classpath
With the release of version 2.7, android's "org.json" package is no longer picked up automatically by j2objc as a -classpath for the java compiler. The package is now inside it's ... More on github.com
🌐 github.com
8
November 13, 2020
error: package org.json does not exist
Has maven downloaded the dependencies? More on reddit.com
🌐 r/CodingHelp
2
1
April 28, 2022
🌐
Coderanch
coderanch.com › t › 666886 › java › package-org-json-exist
package org.json does not exist [Solved] (Beginning Java forum at Coderanch)
Here are some details: $ echo $CLASSPATH /usr/share/java $ ll /usr/share/java/json* -rw-r--r-- 1 root root 49176 Jun 12 22:31 /usr/share/java/json-20160212.jar $ jar tf /usr/share/java/json-20160212.jar META-INF/MANIFEST.MF META-INF/ META-INF/maven/ META-INF/maven/org.json/ META-INF/maven/org.json/json/ META-INF/maven/org.json/json/pom.properties META-INF/maven/org.json/json/pom.xml org/ org/json/ org/json/CDL.class org/json/Cookie.class org/json/CookieList.class org/json/HTTP.class org/json/HTTPTokener.class org/json/JSONArray.class org/json/JSONException.class org/json/JSONML.class org/json/
🌐
JetBrains
intellij-support.jetbrains.com › hc › en-us › community › posts › 6135911711634-Package-org-json-simple-x-Does-not-Exist
Package org.json.simple.x Does not Exist – IDEs Support (IntelliJ Platform) | JetBrains
When i Attempt to Build My Project i get 'package org.json.simple does not exist' as an Error, In the Normal View it does not mark any errors, only When Building, Help would be appreciated!
Find elsewhere
🌐
GitHub
github.com › SpencerPark › IJava › issues › 106
package does not exist · Issue #106 · SpencerPark/IJava
May 14, 2020 - package does not exist#106 · Copy link · sant527 · opened · on Aug 8, 2020 · Issue body actions · I am new to Ijava in jupyter · import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; JSONObject myjsonobj = new JSONObject(); myjsonobj.put("id", "1"); myjsonobj.put("name", "name1"); JSONArray jsonArray = new JSONArray(); jsonArray.add(myjsonobj); I get ·
Author   sant527
🌐
Mendix
community.mendix.com › link › spaces › java-actions › questions › 91583
Java Compilation Error - package org.json does not exist
October 12, 2018 - The Mendix Forum is the place where you can connect with Makers like you, get answers to your questions and post ideas for our product managers.
🌐
Maven Repository
mvnrepository.com › artifact › org.json › json
Maven Repository: org.json » json
December 24, 2025 - JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. ... JSON is a light-weight, language independent, data interchange format. See http://www.JSON.org/ The files in this package implement JSON encoders/decoders in Java.
🌐
Google Groups
groups.google.com › g › j2objc-discuss › c › O-t4wGix9J8
Parser.java:3: package org.json does not exist
December 10, 2020 - Does it mean to add library which are separated from ` ... Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message ... That's correct. The org.json API is not part of the Java Runtime, and so developers shouldn't expect it to be on the bootclasspath.
🌐
GitHub
github.com › google › j2objc › issues › 1508
package org.json no longer automatically included into the classpath · Issue #1508 · google/j2objc
November 13, 2020 - With the release of version 2.7, android's "org.json" package is no longer picked up automatically by j2objc as a -classpath for the java compiler. The package is now inside it's own json.jar file (still inside the lib folder however) and previously ...
Author   JustinGanzer
🌐
Reddit
reddit.com › r/codinghelp › error: package org.json does not exist
r/CodingHelp on Reddit: error: package org.json does not exist
April 28, 2022 -

Hi,

I am using java to create a custom nifi processor and i am trying to use the org.json.simple package to access some information from a json. When i try to compile my code i keep getting the error in the title. below is a my pom.xml:

<?xml version="1.0" encoding="UTF-8"?>

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
 <modelVersion>4.0.0</modelVersion>

 <parent>
     <groupId>1</groupId>
     <artifactId>1</artifactId>
     <version>1</version>
 </parent>

 <artifactId>nifi-processor_stuff-nar</artifactId>
 <version>1</version>
 <packaging>nar</packaging>
 <properties>
     <maven.javadoc.skip>true</maven.javadoc.skip>
     <source.skip>true</source.skip>
 </properties>

 <dependencies>
     <dependency>
         <groupId>1</groupId>
         <artifactId>nifi-processor_stuff-processors</artifactId>
         <version>1</version>
         </dependency>
     <dependency>
         <groupId>com.googlecode.json-simple</groupId>
         <artifactId>json-simple</artifactId>
         <version>1.1.1</version>
     </dependency>
 </dependencies>

</project>
🌐
Reddit
reddit.com › r/javahelp › can't import "json-20240303" library into my project.
r/javahelp on Reddit: Can't import "json-20240303" library into my project.
June 17, 2024 -

I'm going to start by saying I'm a complete novice in Java. I've started computer science recently and I've got a project where I have to create a project to represent a server using sockets. The server will has to function as a control a library's book record/register. My professor provided a .json file with the book lists which I have to use.

I tried creating the project on VS Code, but after following these steps:

Downloaded the library from the Maven Repository.

Created a lib folder in your project's root directory and move the json-20230303.jar file to this folder.

My code couldn't import the library and this error appeared every time I tried to use the library:

"src\Gerenciador.java:2: error: package org.json does not exist import org.json.JSONArray;"

After a while I thought it would be easier to import the library on the Ide Eclipse, but after creating the project and adding it via the Build Path option, it still didn't work. Even though the library appeared in the Libraries section in the Java Build Path.

This error: "The type org.json.JSONObject is not accessible" keeps appearing.

I don't know how to fix the problem. I think I'm calling on the library wrong, but I don't know how I should do it. If there is any information missing, let me know and I'll provide it, it's my first time asking for help on a programming forum.

Top answer
1 of 3
2
Show your pom.xml
2 of 3
1
Please ensure that: Your code is properly formatted as code block - see the sidebar (About on mobile) for instructions You include any and all error messages in full You ask clear questions You demonstrate effort in solving your question/problem - plain posting your assignments is forbidden (and such posts will be removed) as is asking for or giving solutions. Trying to solve problems on your own is a very important skill. Also, see Learn to help yourself in the sidebar If any of the above points is not met, your post can and will be removed without further warning. Code is to be formatted as code block (old reddit: empty line before the code, each code line indented by 4 spaces, new reddit: https://i.imgur.com/EJ7tqek.png ) or linked via an external code hoster, like pastebin.com, github gist, github, bitbucket, gitlab, etc. Please, do not use triple backticks (```) as they will only render properly on new reddit, not on old reddit. Code blocks look like this: public class HelloWorld { public static void main(String[] args) { System.out.println("Hello World!"); } } You do not need to repost unless your post has been removed by a moderator. Just use the edit function of reddit to make sure your post complies with the above. If your post has remained in violation of these rules for a prolonged period of time (at least an hour), a moderator may remove it at their discretion. In this case, they will comment with an explanation on why it has been removed, and you will be required to resubmit the entire post following the proper procedures. To potential helpers Please, do not help if any of the above points are not met, rather report the post. We are trying to improve the quality of posts here. In helping people who can't be bothered to comply with the above points, you are doing the community a disservice. I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
🌐
Salesforce
trailhead.salesforce.com › trailblazer-community › feed › 0D5KX00000TjUlA0AV
json-sample Dependency issue with - Trailhead - Salesforce
March 2, 2020 - From 16:00 UTC on January 17, 2026, to 20:00 UTC on January 17, 2026, we will perform planned maintenance on the Trailhead, myTrailhead, and Trailblazer Community sites. During the maintenance, these sites will be unavailable, and users won't ...
🌐
GeeksforGeeks
geeksforgeeks.org › java › what-is-json-java-org-json
What is JSON-Java (org.json)? - GeeksforGeeks
July 17, 2022 - JSON.simple is a library in java is used that allows parsing/generating/transforming/querying JavaScript Object Notation, etc., Necessary jar file: json-simple-1.1.jar. It has to be available in the classpath · In Maven-driven projects it should be present in pom.xml as follows · <dependency> <groupId>com.googlecode.json-simple</groupId> <artifactId>json-simple</artifactId> <version>1.1.1</version> </dependency> We can store the items in the form of JSONObject or JSONArray.
🌐
Maven Central
central.sonatype.com › artifact › org.json › json
org.json:json - Maven Central
This is a reference implementation. There are a large number of JSON packages in Java. Perhaps someday the Java community will standardize on one. Until then, choose carefully. ... <dependency> <groupId>org.json</groupId> <artifactId>json</artifactId> <version>20251224</version> </dependency>
🌐
Jar-Download
jar-download.com › home › org.json › json › 20200518 › source code › jsonobject.java
org.json.JSONObject Maven / Gradle / Ivy
org.json.JSONObject maven / gradle build tool code. The class is part of the package ➦ Group: org.json ➦ Artifact: json ➦ Version: 20200518
🌐
OpenRewrite
docs.openrewrite.org › recipe catalog › java › spring › spring security 5.x › rename the package name from `com.nimbusds.jose.shaded.json` to `net.minidev.json`
Rename the package name from com.nimbusds.jose. ...
@@ -1,2 +1,2 @@ -import com.nimbusds.jose.shaded.json.JSONObject; -import com.nimbusds.jose.shaded.json.JSONValue; +import net.minidev.json.JSONObject; +import net.minidev.json.JSONValue; This recipe has no required configuration options. It can be activated by adding a dependency on org.openrewrite.recipe:rewrite-spring in your build file or by running a shell command (in which case no build changes are needed):
Published   3 weeks ago