0

I am trying to program a discord bot in Java with Gradle and JDA, I am trying to use:

builder.addEventListeners(new Main());

But when starting it gives me the error:

Exception in thread "main" java.lang.NoClassDefFoundError: jdk/tools/jaotc/Main
        at Main_class.main(Main_class.java:21)
    Caused by: java.lang.ClassNotFoundException: jdk.tools.jaotc.Main
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:604)
        at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
        ... 1 more

Can someone help me?

NullPointerException
  • 3,732
  • 5
  • 28
  • 62
Yess
  • 11
  • 2
  • Possible duplicate of [What causes and what are the differences between NoClassDefFoundError and ClassNotFoundException?](https://stackoverflow.com/questions/1457863/what-causes-and-what-are-the-differences-between-noclassdeffounderror-and-classn) – Minn Oct 18 '19 at 11:27

1 Answers1

0

Your app does not know anything about jdk.tools.jaotc.Main. Try to find out dependency with this class and include it to your classpath