Strange ClassNotFoundExcption

Discussion in 'Plugin Development' started by Nalydmerc, Apr 12, 2014.

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

    Nalydmerc

    I've been coding for a long time, but for the life of me I cannot figure this out.

    Error:
    plugin.yml:
    Setup:
    [​IMG]

    I've had problems with the .classpath during this, as well, so I'll go ahead and post it:
    Bump.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 7, 2016
  2. Offline

    Europia79

    Nalydmerc

    You have 14 classes total that "extends JavaPlugin"

    for one file that I saw, you did it so that you could use the Bukkit scheduler and pass "this" to it.

    Instead of that.

    Right before you need a Plugin for something, do

    Code:
    Plugin p = Bukkit.getPluginManager().getPlugin("N3K");
    then pass "p" instead of "this"

    I changed everything and submitted a Pull Request on the github repository
     
  3. Offline

    Nalydmerc

    Thank you. I changed everything around like you submitted. Unfortunately, though, I am still getting the error.

    Also, since I didn't post it before, even though you already found it, for everyone else, the code can be found at https://github.com/Nalydmerc/N3K

    It still gives me the same ClassNotFountException.

    It's also worth noting this:

    When I edit the Build Path in the Project properties and set up everything normally, I get this:
    https://www.dropbox.com/s/nnyf6j9wht1kmmj/Screenshot 2014-04-13 14.35.31.png

    Looking at the classpath, everything looks normal:
    After some experimenting, I found that I can get around this and export it successfully if I add an extra '/' to the end of the craftbukkit line (like all the rest of them have) like so:

    I have little/no knowledge of whatever kind of code this is, but I did this just experimenting, attempting to fix it.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 7, 2016
  4. Offline

    Europia79

    Nalydmerc

    Oh sorry, i didn't notice you still had problems:

    HTML:
    <br/>
    the extra slash is XML to end a tag. So ya, i see that it says XML at the very top, which means that you do need the extra slash at the end "/>"

    Did you solve this problem ? Cause I don't use Eclipse. I use Netbeans. Also, i was able to build with Netbeans with no problems and startup the server with N3K.jar

    so... what I was *trying* to do was replicate the error you got... But I couldn't. It worked fine for me.

    Tag me if you need any more help.

    The only problems I had building this project was that I had to convert from UTF-8 encoding to Windows-1252 encoding because one of the command executors had special characters that wouldn't compile with UTF-8

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 7, 2016
  5. Offline

    Nalydmerc

    I did not solve this problem. I think it has something to do with Eclipse. When I add the extra /, I open the build path in the project properties and it has nothing in it, as if it's empty, as if Eclipse can't read it or something. When I edit the build path in the project properties, Eclipse doesn't add that extra /.

    I'll continue working on it. Maybe I can figure something out about it. :/
     
Thread Status:
Not open for further replies.

Share This Page