线程" main"中的例外情况java.lang.NoClassDefFoundError:com / sun / jersey / api / client / config / ClientConfig RestFul

时间:2014-11-05 07:45:50

标签: rest jar client

我的Restful网络服务和客户端工作正常。我构建客户端成为jar文件。但是我收到以下错误:

Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/jersey/api/client/config/ClientConfig
    at ass.main(ass.java:13)
Caused by: java.lang.ClassNotFoundException: com.sun.jersey.api.client.config.ClientConfig
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    ... 1 more

1 个答案:

答案 0 :(得分:1)

您似乎错过了类路径中的jersey-client.jar。下载并将其添加到类路径中。