ClassNotFoundException:org.json.JSONException [英] ClassNotFoundException: org.json.JSONException

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

问题描述

即使在classpath中拥有json.jar和commons-collections.jar之后,我也得到了以下异常。它完全失败的导入语句为 JSONException

I get the below exception even after having json.jar and commons-collections.jar in classpath. It fails exactly at the import statement for JSONException

Caused by: java.lang.ClassNotFoundException: org.json.JSONException
at java.net.URLClassLoader.findClass(URLClassLoader.java:434)
at com.ibm.ws.bootstrap.ExtClassLoader.findClass(ExtClassLoader.java:191)
at java.lang.ClassLoader.loadClass(ClassLoader.java:660)
at com.ibm.ws.bootstrap.ExtClassLoader.loadClass(ExtClassLoader.java:111)
at java.lang.ClassLoader.loadClass(ClassLoader.java:626)
at com.ibm.ws.classloader.ProtectionClassLoader.loadClass(ProtectionClassLoader.java:62)
at com.ibm.ws.classloader.ProtectionClassLoader.loadClass(ProtectionClassLoader.java:58)
at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:509)
at java.lang.ClassLoader.loadClass(ClassLoader.java:626)
... 30 more


推荐答案

那看起来像运行时错误,而不是编译错误,所以t他建立路径可能对你没有帮助。你的课堂上有这些罐子吗?这就是在运行时用于查找类的内容。

That looks like a runtime error, not a compile error, so the build path probably doesn't help you. Do you have those jars in your classpath? That's what's used at runtime to find classes.

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

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