我该如何解决这个java.lang.NoClassDefFoundError:org.json.simple.JSONObject错误?

时间:2015-06-09 21:11:19

标签: java json jersey rad

我正在使用Jersey框架和Tomcat在Rational Application Developer中开发Web API。我想使用JSON,但是我收到以下错误: enter image description here

我知道这通常是因为缺少jar,所以我确保它包含在我的构建路径中: enter image description here

在我的包含中:

import java.util.ArrayList;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.UriInfo;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.io.IOException;
import java.io.StringWriter;
import com.ibm.CORBA.iiop.Request;
import org.json.simple.JSONObject;

(我知道他们很乱,我是Java的新手。) 如果有人能帮我解决这个错误或指出我正确的方向,我真的很感激!

0 个答案:

没有答案