添加到特定于项目的类路径后会出现 Junit 警告

发布于 2024-11-27 00:10:25 字数 251 浏览 5 评论 0原文

当我添加 junit4.8.jar 来 eclipse 时,它​​在问题窗口中显示警告。 我添加 Junit >>>右键单击项目->属性->Java构建路径->库->添加库 ->用户库 我正在使用日食太阳神 警告是—— 类路径条目 org.eclipse.jdt.USER_LIBRARY/Junit 4.8 将不会导出或发布。可能会导致运行时 ClassNotFoundExceptions。

请告诉我为什么会出现这个警告

As I add junit4.8.jar to eclipse its showing warning in problem windows.
I Add Junit >>> right click on project-> properties->Java Build Path->libraries->add library
->user library
I am using eclipse helios
Warning is-
Classpath entry org.eclipse.jdt.USER_LIBRARY/Junit 4.8 will not be exported or published. Runtime ClassNotFoundExceptions may result.

Please tell me why this warning is coming

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

我要还你自由 2024-12-04 00:10:25

它表示您不将 JUnit 库导出到构建中,如果构建依赖于该库的功能,则可能会出现 CNF 异常。从 JUnit 开始,您的构建不应该存在依赖关系,对吗?

从 Eclipse 3.6 开始,只需使用 QuickFix,它就会为您设置正确的属性,以便警告消失。

It says that you dont export the JUnit Library into the build, and if the build relies on the functionality of that lib, there might occur CNF-Exceptions. As of JUnit there shouldnt be a dependency for your build, right?

As of Eclipse 3.6 just use QuickFix, it will set up the right attributes for you so that the warning should disappear.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文