我正在尝试使用java discord api构建discord bot,但在运行以下代码段时:
public static void main(String[] args) throws LoginException {
JDABuilder builder = JDABuilder.createDefault(token);
builder.setActivity(Activity.watching("boop"));
builder.build();
}
它引发以下异常:
Exception in thread "main" java.lang.NoClassDefFoundError: gnu/trove/map/TLongObjectMap
at net.dv8tion.jda@4.2.0_216/net.dv8tion.jda.api.entities.Activity.watching(Activity.java:204)
at rambot/rambot.discord.MainApp.main(MainApp.java:14)Caused by: java.lang.ClassNotFoundException: gnu.trove.map.TLongObjectMap
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:606)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:168)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
... 2 more
为什么要扔这个,我该怎么修?
暂无答案!
目前还没有任何答案,快来回答吧!