Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to convert all .class files into .java file from a .jar file

I have a .jar file and When I extract it, It gives me all the .class files present in that jar file.

I have decompiled all the .class files using http://jd.benow.ca/ tool but i want that all the .class files should save into .java files.

Right now i can see only the code but extension is not converting to .java.

Anybody Please help me in this.

like image 210
Govind Gupta Avatar asked Jun 09 '16 12:06

Govind Gupta


2 Answers

you can use javadecompilers and its works perfectly

enter image description here

and in the next step you decompile with Upload and Decompileand this page be showing

enter image description here

and thats is just copy the package folder from the jarname.zip and paste it in you project.

i tested its work for me .

enter image description here

you can see this answer for more.

like image 68
Hosseini Avatar answered Oct 19 '22 23:10

Hosseini


jd-cmd

https://github.com/kwart/jd-cmd

works fine for decompiling. I used it to convert whole jars into source code. Look up the command line options for more details, e.g. --outputDir for specifying a directory for the generated source code.

like image 28
J Fabian Meier Avatar answered Oct 19 '22 23:10

J Fabian Meier