Eclipse does not find imports Jersey


I'm trying to implement the very simple client specified here in section 6.5 and given by the following Eclipse Java code (under Ubuntu):

package de.vogella.jersey.first.client;


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
    // Get plain text
    // Get XML
    // The HTML


  private static URI getBaseURI() {
    return UriBuilder.fromUri("http://localhost:8080/de.vogella.jersey.first").build();

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.

However, I keep getting the error

The import com.sun.jersey cannot be resolved.

I know Eclipse can't resolve the necessary packages, but how do I make Eclipse know about these? I'd already downloaded and copied the JARS to the WEB-INF/lib directory.

I'm using Eclipse Kepler.

EDIT: Adding the JAR files under the project "Properies / Java Build path" also doesn't work.

I'm having better success with this very good video tutorial.

I'm using Eclipse Kepler. Make sure to install JBoss via the "Help/Eclipse Marketplace..." menu first though. You will also need the desired Jersey archive.

By following the above tutorial, I now believe the original problem was due to the fact I didn't have the correct JAR files installed. I originally used the bundle zip on this web page, but in fact you should use the JARs found here, as stated above.