How can I resolve this java.lang.NoClassDefFoundError: org.json.simple.JSONObject error?

梦想的初衷 提交于 2019-12-12 00:35:09

问题


I'm developing a Web API in Rational Application Developer using the Jersey framework and Tomcat. I'd like to use JSON, but I'm getting the following error:

I know this is usually because of a missing jar, so I made sure it was included in my build path:

And in my includes:

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;

(I know they're messy, I'm new to Java.) If anyone could help me resolve this error or point me in the right direction, I'd really appreciate it!

来源:https://stackoverflow.com/questions/30742902/how-can-i-resolve-this-java-lang-noclassdeffounderror-org-json-simple-jsonobjec

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!