java - 使用我自己的图书馆,找不到类
问题描述
我正在开发我的 Bukkit 插件,并且我有一个不错的库,我想在其中使用它。不幸的是,有人告诉我找不到该库的类。
org.bukkit.plugin.InvalidPluginException: java.lang.NoClassDefFoundError: zone/luaq/lib/utils/command/LCommandExecutor
总而言之,我的库只是为了让我在处理 Bukkit API 时更轻松。我正在重新制作诸如记分板、命令等之类的东西。但是,当我尝试在我的插件上使用它时,它根本找不到类,我的 IDE (IntelliJ) 也会通知我找不到类,即使它在找到它们时编程(仅当我使用库本身而不是库 jar 文件时才会出现此错误)。
在代码中,这就是我所拥有的。
LCommandUtils.register(this, "broadcast", new Broadcast());
LCommandUtils.register(this, "heal", new Heal(), true);
LCommandUtils.register(this, "feed", new Feed(), true);
LCommandUtils.register(this, "fly", new Fly(), true);
LCommandUtils.register(this, "flyspeed", new FlySpeed(), true);
即使库插件在服务器上加载正常,它似乎也找不到该类。如果有人可以提供帮助,那就太好了。
提前致谢, Luaq
解决方案
推荐阅读
- c++ - 如何在 Visual Studio 2017 中安装 Crypto++
- php - 我使用 python 的 php 代码在 XAMPP 中不起作用
- linux - 通信内核模块和用户空间(驱动程序)
- angular - Angular - 更新到 Firebase
- php - Docker 在 ubuntu 16.04 上安装 php5.6 和 lighttpd
- java - 制作一个jar文件,应用程序被java安全阻止
- javascript - 如何在遍历 div 数组时获取子 img 元素的 src 属性?
- codemirror - CodeMirror 自定义字体的文本宽度
- python - 在 Python 中解析半结构化文本字符串
- audio - 在 Ionic3 和 Angular5 中将 base64 字符串解码为音频文件