title: Eclipse can't find Jersey imports
body: <p>I'm trying to implement the very simple client specified <a href="http://www.vogella.com/tutorials/REST/article.html" rel="nofollow">here in section 6.5</a> and given by the following Eclipse Java code (under Ubuntu):</p>
  
  <pre><code>package de.vogella.jersey.first.client;
  
  import java.net.URI;
  import javax.ws.rs.core.MediaType;
  import javax.ws.rs.core.UriBuilder;
  
  import com.sun.jersey.api.client.Client;
  import com.sun.jersey.api.client.ClientResponse;
  import com.sun.jersey.api.client.WebResource;
  import com.sun.jersey.api.client.config.ClientConfig;
  import com.sun.jersey.api.client.config.DefaultClientConfig;
  
  public class Test {
      public static void main(String[] args) {
      ClientConfig config = new DefaultClientConfig();
      Client client = Client.create(config);
      WebResource service = client.resource(getBaseURI());
      // Fluent interfaces
      System.out.println(service.path("rest").path("hello").accept(MediaType.TEXT_PLAIN).get(ClientResponse.class).toString());
      // Get plain text
      System.out.println(service.path("rest").path("hello").accept(MediaType.TEXT_PLAIN).get(String.class));
      // Get XML
      System.out.println(service.path("rest").path("hello").accept(MediaType.TEXT_XML).get(String.class));
      // The HTML
      System.out.println(service.path("rest").path("hello").accept(MediaType.TEXT_HTML).get(String.class));
  
    }
  
    private static URI getBaseURI() {
      return UriBuilder.fromUri("http://localhost:8080/de.vogella.jersey.first").build();
    }
  }
  </code></pre>
  
  <p>I've installed the Tomcat server, which I think is working because I can see it in the Servers list of Eclipse, and I've run the example in sections 6.1-6.4 of the same tutorial. I've also added all the Jersey JARS to WEB-INF/lib. I've made sure to start a new Dynamic Web project separate from anything else.</p>
  
  <p>However, I keep getting the error</p>
  
  <pre><code>The import com.sun.jersey cannot be resolved.
  </code></pre>
  
  <p>I know Eclipse can't resolve the necessary packages, but how do I make Eclipse know about these? I'd already downloaded <code>jaxrs-ri-2.9.zip</code> and copied the JARS to the WEB-INF/lib directory.</p>
  
  <p>I'm using Eclipse Kepler.</p>
  
  <p><em>EDIT:</em> Adding the JAR files under the project "Properies / Java Build path" also doesn't work. </p>