Я пытаюсь настроить простой сервер Restlet. Я читал учебники с сайта Restlet. Я связал файл org.restlet.jar с моим classpath и попытался запустить этот код:
import org.restlet.resource.Get;
import org.restlet.resource.ServerResource;
public class data_server extends ServerResource {
public static void main(String[] args) throws Exception {
// Create the HTTP server and listen on port 8182
new Server(Protocol.HTTP, 8182, data_server.class).start();
}
@Get
public String toString() {
return "hello, world";
}
}
И тогда Eclipse покажет мне следующую ошибку:
Exception in thread "main" java.lang.Error: Unresolved compilation problems:
Server cannot be resolved to a type
Server cannot be resolved to a type
Protocol cannot be resolved to a variable
Part03 cannot be resolved to a type
at data_server.main(data_server.java:9)
Может ли кто-нибудь мне помочь?