0

I wanted do use JSON in my NetBeans Project, so I added the JARs in Project--> Libaries, but I still can't use the imports:

The imports I need:

import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
import org.json.simple.parser.ParseException;

The JAR-Files I imported:

http://www.java2s.com/Code/Jar/j/Downloadjavajsonjar.htm

http://www.java2s.com/Code/Jar/o/Downloadorgjsonjar.htm

http://www.java2s.com/Code/Jar/j/Downloadjsonsimple11jar.htm

Ramy
  • 23
  • 5
  • 2
    why not use maven? it's a lot easier to have maven retrieve all the correct libraries compared to manually doing it yourself. – Stultuske Mar 29 '18 at 08:16
  • I second @Stultuske 's point. It's easier to use `Maven` as it will download the dependencies and handle the imports for you. You can look at [this](https://stackoverflow.com/questions/5495213/converting-a-netbeans-project-to-a-maven-enabled-project), should you want to know about how to convert a `netbeans java project` to `maven project` – Arty Mar 29 '18 at 08:24
  • Probably you do not have the right files in the lib folder. Do you have `.jar` files in ./lib ? Post a directory tree of your project. – PeterMmm Mar 29 '18 at 08:53

0 Answers0