问题
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