Are you sure you added the JAR named javax.ws.rs-api-2.0.jar
(in the ext
folder)?
It should contain those imports.
RESTFull Service : Jersey 2.8 Package import error in Eclipse
-
23-07-2023 - |
Pergunta
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.
Solução
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow