質問

I use Eclipse Kepler version, Tomcat 6, JDK 1.8. I add the jars inside JAXRS-ri which was downloaded from here.

Jars are :

jersey-client.jar, jersey-common.jar, jersey-container-servlet.jar, jersey-container-servlet-core.jar, jersey-server.jar.

Once those jars were added into build path in eclipse, and import them (javax.ws) in my java class

import javax.ws.rs.GET;
import javax.ws.rs.Path;

It gives error as they are not found, then I added Jersey 1.8 jars. Then it worked well. But for 2.8 jars, it doesn't work. How can I use 2.8 jars? I am still new to Jersey and please let me know where is the problem.

役に立ちましたか?

解決

Are you sure you added the JAR named javax.ws.rs-api-2.0.jar (in the ext folder)? It should contain those imports.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top