为什么我得到Class not found例外 [英] why I am getting Class not found exception

查看:107
本文介绍了为什么我得到Class not found例外的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 DeferredTextImpl 类和eclipse似乎没有抱怨它,但是当我运行我的项目时,我得到运行时异常 ... .DeferredTextImpl的类未找到异常..

I am using DeferredTextImpl Class and eclipse does not seems to complain about it but when I run my project I get run time exception .... Class not found exception for DeferredTextImpl ..

当我搜索类文件时,我在 rt中找到它.jar 哪个肯定应该在类路径上。我还检查了项目属性 - > Java构建路径中的构建路径,并且可以在最底层看到JRE系统库。当我扩展它。我可以看到 rt.jar 。这意味着它在类路径上,对吗?

When I searched for the class file, I found it in rt.jar which should certainly be on the class path. I also checked the build path in project properties->Java build path and could see JRE System Library at the very bottom. when I expanded that. I could see rt.jar. which means it is on the class path, right ?

为什么我收到此错误?

推荐答案

检查运行时的Xerces jar版本与编译时类的版本。确保在运行时有一个Xerces2 jar。我怀疑rt.jar中的类与您的应用程序正在寻找的类相同。

Check the version of your Xerces jar for your runtime versus you compile time classes. Make sure have a Xerces2 jar at runtime. I doubt the the class in the rt.jar is the same class your application is looking for.

这篇关于为什么我得到Class not found例外的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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