Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Extract source code from .jar file

Is there a way to extract the source code from an executable .jar file (Java ME)?

like image 688
hiba Avatar asked Oct 17 '22 13:10

hiba


People also ask

Can you decompile a jar file?

If you're looking for an easy solution, download Windup and run it's command-line version on your . jar. It will decompile using FernFlower, with support up to Java 8 (jad only suports up to Java 1.3, JavaDecompiler up to Java 1.5 IIRC), with a fallback to Procyon if FernFlower fails.

How do I view the source code of a jar file in Eclipse?

Or, if this source jar file contains the sources of a classes jar file that is used as a library in your Eclipse project, just right-click on this jar file, select "Properties", then "Java Source Attachment", then "External File", and select the source jar file.


1 Answers

Use JD GUI. Open the application, drag and drop your JAR file into it.

like image 95
adarshr Avatar answered Oct 26 '22 11:10

adarshr