Posted on 2011-09-08 08:59
itspy 阅读(330)
评论(0) 编辑 收藏
ClassNotFoundException
当你通过
字符串加载一个Class时,如果出错了就会抛出这个异常.比如.
The forName
method in class Class
.The findSystemClass
method in class ClassLoader
.The loadClass
method in class ClassLoader
ClassNotFoundException
如果程序在运行过程中,比如构造函数new一个对象时,触发加载操作了而没有找到对象.就会抛出这个异常.
详情可以参考:
http://stackoverflow.com/questions/1457863/what-is-the-difference-between-noclassdeffounderror-and-classnotfoundexception