I'm getting NoClassDefFoundError exception when I run this main class through Eclipse
import org.json.simple.parser.JSONParser;
public class A {
public static void main(String args[]) throws IOException {
JSONParser jsonParser = new JSONParser();
// code
}
}
Exception:
Exception in thread "main" java.lang.NoClassDefFoundError: org/json/simple/parser/JSONParser
Caused by: java.lang.ClassNotFoundException: org.json.simple.parser.JSONParser
I am implementing below dependency in gradle file:
implementation 'com.googlecode.json-simple:json-simple:1.1.1'