Import .class file

Discussion in 'Plugin Development' started by 123ang, Nov 22, 2013.

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

    123ang

    Okay, so my friend made this cool paintball code but he only gave me the .class Is there any way of getting it into eclipse. I tried copying it and pasting it in the src but I get an error like this... temp 9.PNG
    is there any other way?
    Please reply.

    ~123ang
     
  2. Offline

    ZeusAllMighty11

    .class is a binary, so I don't believe you can open it any any editor.. Ask him for the .java file
     
  3. Offline

    Not2EXceL

    you could decompile it, using jad, fernflower, etc. or just use jd-gui if you need to.
     
  4. Offline

    123ang

    ZeusAllMighty11
    Okay, so it turns out he gave me the java file how do I get to edit it in Eclipse. temp 10.PNG
     
  5. Offline

    Jake6177

    That looks like a jar file, import it like you did CraftBukkit.

    if it is a .java file:
    Make a class called Paintball in your project and copy the code into it.
     
  6. Offline

    xTrollxDudex

    123ang
    Add it as a dependency
     
    Jake6177 likes this.
  7. Offline

    Dr_Bunsen

  8. Offline

    blablubbabc

    Why don't you just ask your friend?
     
  9. Offline

    Hoolean

    123ang

    Looks like he gave you a .jar file. If you wish to edit the source, you could decompile it with a decompiler such as JD-GUI. However, it would be better for you to get the source from him.
     
Thread Status:
Not open for further replies.

Share This Page