Eclipse not exporting .class files.

Discussion in 'Plugin Development' started by RefinedCode, Jun 11, 2011.

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

    RefinedCode

    Hi guys, I am trying to export the sampleplugin with eclipse into a jar file. I have the plugin.yml and all that but when i load up the craftbukkit server i get the :
    Code:
    Could not load 'plugins\SamplePlugin.jar' in folder plugins:
    java.lang.ClassNotFoundException: com.dinnerbone.bukkit.sample.sampleplugin
    
    
    I extracted the contents of the jar file and there are no class files in that path, only the .java files. What am I doing wrong?

    Thanks
     
  2. Offline

    ZephyrSigmar

    Make sure "Export generated class files and resources" is checked. ;)
     
  3. Offline

    RefinedCode

    Yep that has always been checked :(
     
  4. Offline

    Acrobot

    Do you do export - Jar file?
    (Not runnable jar file, just jar)
    Also, do you have JDK?
     
  5. Offline

    RefinedCode

    Yes I export just jar file and I have the sdk. When i goto installed jres ive added my JDK. Is there anything else I need to do?
     
  6. Offline

    ZephyrSigmar

    You created your plugin in src do you?
    Because if you dont then this is the problem..
     
  7. Offline

    RefinedCode

    The code is located in src yes
     
  8. Offline

    ZephyrSigmar

    Now i remember.
    There is a topic about dont use com.bukkit package names for plugin!
    Make your package name to:me.dinnerbone.pluginname
     
  9. I'v got the same issue, if i remember it right, all i did was : Go to Project, uncheck "Build Automatically" and now it should work, to be sure just press Ctrl+B , whenever you want to export JAR file, but its not needed though.
     
  10. Offline

    RefinedCode

    Ive done it all so far and nothing works, Maybe I should just do this all in netbeans :(
     
  11. Try post code of your plugin here, something might be wrong here.
     
  12. Offline

    RefinedCode

    As I was going through all the suggestions here, I did all of them and realized The src folder was unchecked from the build path... I know I am a failure for this But All of your suggestions were helpful and fixed other potential problems. Thank you so much for your time I now have bukkit all working!
     
  13. haha :).
    Nice that you found it out, good luck and have fun developing your further plugins :).
     
  14. same error with me
    the src file IS checked tho :(

    please help. if i look in the jar file with winrar, the class file ISNT there! i have tried alot of things. please help!!

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 16, 2016
  15. Offline

    Tirelessly

    Try not bumping after 2 minutes. If that doesn't work, try not bumping 1+ year old threads.
     
  16. oops! i didnt know it was a year old :l
     
Thread Status:
Not open for further replies.

Share This Page