为什么无法找到主要课程?

时间:2017-02-04 09:37:33

标签: java restlet

我有一个使用Restlet框架导入的类。该类是从命令行成功编译的,但由于无法找到或加载主类staticfilesexample.TestStaticFiles错误而无法运行。这是文件:

public class TestStaticFiles extends ServerResource {

public static final String ROOT_URI = "file:///D:/myJava/restletTutorials/src/staticfilesexample/testdir";
public static void main(String args[]) throws Exception {

    Component component = new Component();
    component.getServers().add(Protocol.HTTP, 8111);

    component.getClients().add(Protocol.FILE);

    Application application = new Application() {
        //Создание точки входа запросов
        @Override
        public Restlet createInboundRoot() {
            return new Directory(getContext(), ROOT_URI);
        }
    };

    component.getDefaultHost().attach(application);
    component.start();
}

}

这是命令行命令:

java -cp bin;"D:\myJava\restlet-jse-2.3.9\restlet-jse-2.3.9\lib\org.restlet.org" staticfilesexample.TestStaticFiles

这是文件位置:

D:.
├───bin
│   └───staticfilesexample
└───src
    └───staticfilesexample
        └───testdir

0 个答案:

没有答案
相关问题