# How to change class files in jar



## Unbounded Bond (Nov 28, 2008)

I have a jar file(with all classes), i can decompile it to java file and change according to my requirement , but how can i compile it and include it in my jar.
Please tell me a way to do so.


----------



## arpanmukherjee1 (Nov 19, 2009)

use the javax compile it to .jar.

alternative use java eclipse IDE for automation...


----------



## Harinder (Nov 21, 2009)

i have a java mobile app as a .jar file i decompiled it, now i wnt to chnge its code and recompile it,,,can u help me out plz.....!!!!!!!!


----------



## layzee (Dec 8, 2009)

There is unfortunately no perfect decompiler


----------



## rajiv.bandi (Dec 30, 2009)

@Unbounded Bond
Compile it normally as you would do with other java classes. You will get a .class file. Open the jar file with Winzip or 7Zip and replace the previous class file with the new one.

@Harinder
You can also follow the same process as above but normally J2ME apps (if thats what you mean by java mobile apps) are signed using a security certificate. So if you change the class files in the signed jar then it will not be valid and may not run on your mobile.

Let me know if you have any more doubts.


----------

