Recompile the java files which is decompiled by JD-GUI from a jar

Pawan picture Pawan · Oct 10, 2014 · Viewed 10.8k times · Source

I have a MyFile.jar file. I use JD-GUI to decompile it and used its "Save All Sources" options to save the files to a .zip file. Now extracted the .zip file and edited a .java file.

the folder structure after extracting .zip file is like this

                       _____ META-INF(folder)
source(folder) -------|     
                      ------com(folder)-->example--->App---> all .java files   

now how do i recompile it back to .jar file ??

Answer

dasrohith picture dasrohith · Oct 10, 2014

As mentioned in your question, you have decompiled the class files to java files and have done necessary modifications.

Hope you have imported that as a project in eclipse. Export the same as jar. point to be noted is that you should know the dependencies for building the project