Solved ClassNotFoundException - But why?

Discussion in 'Plugin Development' started by Tabpi, Jun 25, 2016.

Thread Status:
Not open for further replies.
  1. Offline


    Hey there,
    The main plugin of my server was deleted, but that is not too bad because I wanted to update it to a new level anyway.
    So I created a new plugin (MainPlugin) and I think I followed the same steps like before, but now on every server start there is this error:
    Here are some other infos:
    I hope anyone can explain to me. :/
    Looking forward to nice answers,
    Tabpi :3
  2. Look in the exported .jar file if the main class is in the path. Everything else seems ok
  3. Offline


    @Tabpi Well as your stacktrace says, it cant find your main class. You plugin.yml seems to be fine with the location of the class. The only thing i would guess is that you may not be exporting the plugin correcty.
  4. Offline


    I already looked inside jar and export options, here are screenshots:

    IntelliJ IDEA - Artifacts: Export1.PNG
    Inside the built jar file:
    Yeah, it's German ^_^

    I really don't understand how to solve this :/
  5. Wow really useful if you hide your name in the second picture but it shows it in the first one /_.

    Maybe the plugin.yml is in the wrong location. Right click on your project folder and create the plugin.yml file in there. Not in src or in your package
  6. Offline


    Now that I look at it, I don't even know why I censored it, my first name actually doesn't matter ^_^
    And I think I tried your thought earlier. I can't try it at the moment, but I'm pretty sure there will be the same error :/
  7. Offline


    You're exporting it wrong; you're exporting the source, not the actual class files. Not entirely too sure how you did that, but here's what it should look like (obviously include plugin.yml; mine doesn't for dev reasons)
    You need to drag the "compile output" into "MainPlugin.jar"
    Tabpi likes this.
  8. Offline


    Oh... uhm... hehe... eh...
    Well, this was unexpected for me. Compile output makes much more sense actually!
    Thank you all for fixing a brain afk ^-^

    btw, I really like this animation, @Cirno :3
Thread Status:
Not open for further replies.

Share This Page