java.lang.ClassNotFoundException: org.restlet.service.TunnelService command line

I am using the Restlet framework. I am trying to run my project from a jar file created using Eclipse, by doing: **Export->Runnable JAR File**, and selecting the option Package required libraries into generated jar. However, when I try to execute the jar file in the command line, by typing: java -Djava.security.policy=Client.Policy -jar identiscopeRunnable.jar I get the following: Exception in thread "main" java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58) Caused by: java.lang.NoClassDefFoundError: org/restlet/service/TunnelService at rest.IdentiscopeServer.main(IdentiscopeServer.java:24) ... 5 more Caused by: java.lang.ClassNotFoundException: org.restlet.service.TunnelService at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:423) at java.lang.ClassLoader.loadClass(ClassLoader.java:356) ... 6 more I have added all the jar files downloaded from the Restlet Framework to my project, so I presume it is not a problem with them. Does anyone have any clue about this? Just in case anyone asks, the line 24 of `IdentiscopeServer.java` is: IdentiscopeServerApplication identiscopeServerApp = new IdentiscopeServerApplication(); The class `IdentiscopeServerApplication` basically does this: @Override public Restlet createInboundRoot() { Router router = new Router(getContext()); //attaches the /tweet path to the TweetRest class router.attach("/collectionPublic", CollectionPublicREST.class); router.attach("/collectionPrivate", CollectionPrivateREST.class); router.attach("/analysis", AnalysisREST.class); return router; }

以上就是java.lang.ClassNotFoundException: org.restlet.service.TunnelService command line的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏