java.lang.NoClassDefFoundError:org / hamcrest / SelfDescribing [英] java.lang.NoClassDefFoundError: org/hamcrest/SelfDescribing

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

问题描述

eclipse 中运行 junit 测试我得到这个异常

  java.lang.NoClassDefFoundError:org / hamcrest / SelfDescribing 

我添加了 junit.jar 库文件。



我尝试过不同版本的junit.jar: 4.4 4.8



如何解决这个异常?

解决方案

添加 hamcrest-all-XXjar 到您的 classpath



截至2015年2月的最新版本为1.3 :
http://code.google.com/p/hamcrest/downloads/detail?name=hamcrest-all-1.3.jar&can=2&q=


While running junit test in eclipse I am getting this Exception:

java.lang.NoClassDefFoundError: org/hamcrest/SelfDescribing

I've added junit.jar library file.

I've tried different versions of junit.jar: 4.4, 4.8, etc.

How do I fix this Exception?

解决方案

Add hamcrest-all-X.X.jar to your classpath.

Latest version as of Feb 2015 is 1.3: http://code.google.com/p/hamcrest/downloads/detail?name=hamcrest-all-1.3.jar&can=2&q=

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

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