How to Decompile JAR files and View Source Code of Java Programs
In software terms, JAR (Java Archive) is a package file format typically used to aggregate many Java class files and associated metadata and resources (text, images, etc.) into one file to distribute application software or libraries on the Java platform.
Typically, The Contents of any JAR file can be viewed by Extracting the JAR file with the Help of Tools like WinZIP or WinRAR.
Once You have successfully extracted the contents of the JAR file . you will get a lot of Files with file extension ".class" and these class files are not in Human Readable Format.
So, to Overcome this problem and to view the original JAVA source code hidden inside these class files stored inside the JAR file container ,we use a tool called JD-GUI.
JD stands for "Java Decompiler" . It is a standalone graphical utility that displays Java source codes of “.class” files. You can browse the reconstructed source code with the JD-GUI for instant access to methods and fields
Now, i am going to Demonstrate how exactly you can view the source code from JAR files .
First , Download the JD-GUI software
Download Windows Version
Download Linux Version
Download Mac Version
Now, Extract the ZIP file and you will get these Files (I am showing only Windows Version)
Now,Double Click on JD-GUI icon
and You get the Home Screen Like this
After Opening JAR file , you will get a window like this
Now Click on the + icon to expand and View the Contents of the packages.
Note : ".class" files are found inside these packages.
Here my package is "bruteCUI" and then you get a List of ".class" files
Now Click on any class file to view its contents
Thus , You can View the contents and any class files and understand how exactly the java program was coded by the Developer
This technique can be used to Reverse Engineer or to Decompile any JAR file .
Thanks for Reading.....and Stay tuned for More.....
Typically, The Contents of any JAR file can be viewed by Extracting the JAR file with the Help of Tools like WinZIP or WinRAR.
Once You have successfully extracted the contents of the JAR file . you will get a lot of Files with file extension ".class" and these class files are not in Human Readable Format.
So, to Overcome this problem and to view the original JAVA source code hidden inside these class files stored inside the JAR file container ,we use a tool called JD-GUI.
JD stands for "Java Decompiler" . It is a standalone graphical utility that displays Java source codes of “.class” files. You can browse the reconstructed source code with the JD-GUI for instant access to methods and fields
Now, i am going to Demonstrate how exactly you can view the source code from JAR files .
First , Download the JD-GUI software
Download Windows Version
Download Linux Version
Download Mac Version
Now, Extract the ZIP file and you will get these Files (I am showing only Windows Version)
Now,Double Click on JD-GUI icon
and You get the Home Screen Like this
Click on File - > Open and Choose any JAR file of your Choice
Now Click on the + icon to expand and View the Contents of the packages.
Note : ".class" files are found inside these packages.
Here my package is "bruteCUI" and then you get a List of ".class" files
Now Click on any class file to view its contents
Thus , You can View the contents and any class files and understand how exactly the java program was coded by the Developer
This technique can be used to Reverse Engineer or to Decompile any JAR file .
Thanks for Reading.....and Stay tuned for More.....
Comments
Post a Comment