当我通过Eclipse运行这个主类时,我得到了NoClassDefFoundError异常
import org.json.simple.parser.JSONParser;
public class A {
public static void main(String args[]) throws IOException {
JSONParser jsonParser = new JSONParser();
// code
}
}例外:
Exception in thread "main" java.lang.NoClassDefFoundError: org/json/simple/parser/JSONParser
Caused by: java.lang.ClassNotFoundException: org.json.simple.parser.JSONParser我在gradle文件中实现了以下依赖项:
implementation 'com.googlecode.json-simple:json-simple:1.1.1'发布于 2020-09-29 14:59:47
您是否更改/设置了当前项目的类路径?也许这就是为什么你的程序会给你错误
https://stackoverflow.com/questions/64114143
复制相似问题