Importing an old plugin into Eclipse

Discussion in 'Plugin Development' started by sgavster, Apr 6, 2015.

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

    sgavster

    **If this is the wrong section please tell me

    Hello!

    A while back, I lost everything on my computer, being the reason I left bukkit for a while..
    I was wondering if I could take plugins I have(download them from Bukkit) and put them in Eclipse?

    Thanks for any help!
     
  2. Offline

    vhbob

    As long as your not taking ownership for work you didnt do its fine
     
  3. Offline

    sgavster

    @vhbob I know-- they are mine.

    I don't know how to import them (easily) into Eclipse.
     
  4. Offline

    vhbob

    @sgavster Make a new folder, right click it, then hit import and import your file!
     
  5. Offline

    nverdier

    @sgavster And you have to decompile it, if you haven't already.
     
  6. Offline

    mythbusterma

    @sgavster

    As long as you didn't do anything stupid with your code (read: obfuscated), you should be able to decompile it no issues, you'll probably have to pull the plugin.yml and other resources directly from the .jar, however.
     
  7. Offline

    EstToxicGaming

    Download java decompiler
     
  8. Offline

    sgavster

    @EstToxicGaming That's completely not needed. Why would I do that, if I really wanted I could just extract the jar.. I want an easy way to do it.

    Edit: I didn't mean to sound rude. I just need an easier way.
     
  9. Offline

    nverdier

    @sgavster To get the code from a jar, you have to decompile it. Hence, download a decompiler.
     
  10. Offline

    sgavster

    @nverdier I thought there was another way.

    Isn't there a way to extract the files and put them in eclipse?

    I really don't want to copy-paste a 20-class plugin..
     
  11. Offline

    nverdier

    @sgavster
    1) Download the jar.
    2) Decompile it.
    3) Save all sources.
    4) Import to Eclipse.

    Also, I'd recommend IntelliJ, just sayin' :p
     
    mythbusterma likes this.
Thread Status:
Not open for further replies.

Share This Page