Mashape Unirest的Java:java.lang.NoClassDefFoundError的 [英] Mashape Unirest Java : java.lang.NoClassDefFoundError

查看:756
本文介绍了Mashape Unirest的Java:java.lang.NoClassDefFoundError的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我建立使用Mashape的 Unirest库 应用程序(unirest-java的1.2。 6.jar)
在运行时我得到的NoClassDefFoundError 。我试着 CommonsWare 的方法。但它没有工作。这里是Java构建路径的屏幕截图。什么错在这个截图?

I'm building an application using Mashape's Unirest library(unirest-java-1.2.6.jar) . I'm getting NoClassDefFoundError during runtime. I tried CommonsWare's method. But it didn't work. Here is the screenshot of Java Build Path. Anything wrong in this screenshot??

推荐答案

Unirest-的作者Java的的。

为了使用这个库,你需要包含所需的依赖到项目:

In order to use the library, you need to include the required dependencies into your project:


  • 阿帕奇HttpComponents客户端

  • 阿帕奇HttpComponents AsyncClient

  • 阿帕奇HttpComponents哑剧

  • JS​​ON库

使用的Maven 是preferred方法:的 https://github.com/Mashape/unirest-java#installing

Using Maven is the preferred method: https://github.com/Mashape/unirest-java#installing

否则库可以手动从 http://hc.apache.org/downloads.cgi <下载/ A>和 http://www.json.org/java/index.html

但同样,我会强烈建议使用Maven。也请更新Unirest库到最新版本,因为 1.2.6 是德$ P $现在pcated。

But again, I would strongly recommend to use Maven. Also please update the Unirest library to the newest version because 1.2.6 is deprecated now.

这篇关于Mashape Unirest的Java:java.lang.NoClassDefFoundError的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆