modifying a class file inside jar

Discussion in 'Java' started by sakthi.abdullah, Aug 25, 2007.

  1. sakthi.abdullah

    sakthi.abdullah New Member

    Joined:
    Mar 15, 2007
    Messages:
    29
    Likes Received:
    1
    Trophy Points:
    0
    I want to modify a .class file inside a jar file and put it back ..
    How to do this?
     
  2. pradeep

    pradeep Team Leader

    Joined:
    Apr 4, 2005
    Messages:
    1,645
    Likes Received:
    87
    Trophy Points:
    0
    Occupation:
    Programmer
    Location:
    Kolkata, India
    Home Page:
    http://blog.pradeep.net.in
    A class file contains bytecode, you'll to decompile it to the source and the modify and recompile!
     
  3. sakthi.abdullah

    sakthi.abdullah New Member

    Joined:
    Mar 15, 2007
    Messages:
    29
    Likes Received:
    1
    Trophy Points:
    0
    I decompiled into source code(I mean the java files)

    Now I cannot compile it seperately...

    Actually I tried like this in the cmd prompt.... I added required jar files in the classpath and compiled.. There is a statement like this "ClassNotFoundException x1" which gives an error - invalid declaration
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice