简体   繁体   English

Java Eclipse Java 构建路径添加项目 ClassNotFoundException

[英]Java Eclipse Java Build Path add Projects ClassNotFoundException

I have a Java project, where I collect all my util classes and I want to use them in other projects.我有一个 Java 项目,我收集了所有的 util 类,我想在其他项目中使用它们。 So I have tried to add the utils project to the Java Build Path of the project where I want to use the utils.因此,我尝试将 utils 项目添加到要使用 utils 的项目的 Java Build Path 中。 But when I use them, I get a ClassNotFoundException at runtime, but no compile errors.但是当我使用它们时,我在运行时得到一个 ClassNotFoundException,但没有编译错误。

How can I solve this?我该如何解决这个问题?

Edit: Screenshots编辑:截图

在此处输入图片说明 在此处输入图片说明

Edit: Solution:编辑:解决方案:

在此处输入图片说明

So in your ChunkPlots folder on you filesystem, look for a .classpath file and verify you have a line that looks like因此,在文件系统上的 ChunkPlots 文件夹中,查找 .classpath 文件并验证您有一行看起来像

<classpathentry combineaccessrules="false" kind="src" path="/BukkitUtils"/>

I've done something like this before and that line is in that file for me.我以前做过这样的事情,那行在我的文件中。 I might have used the Libraries tab to add the project.我可能使用了库选项卡来添加项目。 I don't really remember and I don't use Eclipse anymore.我真的不记得了,我不再使用 Eclipse。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM