我的代码在 Eclipse 中编译,但我在运行时得到 ClassNotFound 我该如何修复它? [英] My code compiles in Eclipse but I get a ClassNotFound at runtime how can I fix it?

查看:25
本文介绍了我的代码在 Eclipse 中编译,但我在运行时得到 ClassNotFound 我该如何修复它?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么会导致 jar 成功添加到 Eclipse Java 项目,但在运行时却找不到该 jar 中的某些类,并出现 ClassNotFound 异常?

What would cause a jar to be added successfully to an Eclipse Java project but then at runtime some of the classes from that jar are not found with ClassNotFound exceptions?

推荐答案

运行时的 CLASSPATH 变量可能设置不正确,或者您未将某些类添加到 jar 文件中.

The CLASSPATH variable at runtime is likely set incorrectly or you missed adding some classes to your jar file.

这篇关于我的代码在 Eclipse 中编译,但我在运行时得到 ClassNotFound 我该如何修复它?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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