ClassNotFound exception

Discussion in 'Plugin Development' started by Hath, Jan 22, 2011.

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

    Hath

    Hi,
    I'm trying to make a really simple plugin. I am having trouble with the setup.
    Code:
    
    Jan 22, 2011 2:06:58 PM org.bukkit.plugin.SimplePluginManager loadPlugins
    SEVERE: Could not load plugins\Pmark.jar in plugins: null
    org.bukkit.plugin.InvalidPluginException
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:83)
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:117)
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:82)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:43)
        at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:153)
        at net.minecraft.server.MinecraftServer.c(MinecraftServer.java:140)
        at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:104)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:177)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:512)
    Caused by: java.lang.ClassNotFoundException: com.bukkit.Aaron.Pmark
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:29)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Unknown Source)
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:77)
        ... 8 more
    
    Here is my code, http://pastebin.com/nNu6n7DJ
    I have adapted it from http://forums.bukkit.org/threads/basic-bukkit-plugin-tutorial.1339/
    I'm not really sure what's going on. The yml is in place and the code looks like everything needed is imported. They all have the correct package identifiers. Is there a setting for dependencies that I'm missing? Am I exporting the project to a jar incorrectly somehow?
     
  2. Offline

    mjmr89

    The yml file doesn't point to the right place. It has to point to your main plugin file. So from your code, your general package is com.bukkit.Aaron.Pmark, so the "main" line in your yml file would be,
    "main: com.bukkit.Aaron.Pmark.Pmark".
     
  3. Offline

    Hath

    wow that was so simple. UGH. Thanks!
     
Thread Status:
Not open for further replies.

Share This Page