Jadclipse decompiler plugin

This is one of the tutorials regarding eclipse to integrate – java jadclipse decompiler plugin. Jadclipse provides a plugin for eclipse to decompile the class file on fly and show the content. There are many other ways to de compile the class file and to integrate this plugin with your IDE. You can also refer – https://marketplace.eclipse.org/content/eclipse-class-decompiler. However not everytime and everywhere this may work. Lets see how to manually configure and integrate the jadclipse plugin in eclipse.

Refer http://jadclipse.sourceforge.net/wiki/index.php/Main_Page for all the details. Lets do step wise installation.

Step 1: Download the jadclipse jar from any of the source. Best available sourceforge. The link is also available in the above page.

Step 2: Put the downloaded jar file in the plugins folder of eclipse.

jar-location.png
jar-location.png

Step 3: Now download the executable for de-compilation from http://varaneckas.com/jad/. You can take latest required version.

Step 4: Unpack the downloaded zip file, you will have two files there one executable and one readme file. jad.exe is the required file for decompilation. Put that jad.exe file in one of the directory lets say – C:\jad\jad.exe.

Step 5: Open eclipse or restart the eclipse if already open. Go to Windows > Preferences > Java, JadClipse option will be enabled. There, set the path to decompiler, that is the executable file which will de compile the class file. Put the path for where we have kept the .exe in Step 4 and the path for temporary files.

decompiler-path.png - jadclipse decompiler plugin
decompiler-path.png

Step 6:  Set the default editor option for displaying the generated source of class files. In case the default option is not set to JadClipse class file editor then set it. See the below steps.

editor-association_1 - jadclipse decompiler plugin
editor-association_1.png
editor-association_2 - jadclipse decompiler plugin
editor-association_2.png

Here, for unavailable source of class files, set the JadClipse option so that jadclipse will generate the source for such class files and display.

save-editor-association.png - jadclipse decompiler plugins
save-editor-association.png

Make it as default, so that you need not to explicitly open it with JadClipse option.

save-editor-association-default.png - jadclipse decompiler plugin
save-editor-association-default.png

Now, you can see the source for all the class files. Lets check this with a simple example. Let us create a simple program.

package com.code2java.jadclipse;

import java.util.HashMap;

public class JadClipseTest {
	
	public static void main(String[] args) {
		
		HashMap<String, String> hashMap = new HashMap<String, String>();
	}

}

Here, HashMap class is being used, however by default you cannot see the source of this class. But using jadclipse you can now view the source. The source will be something like-

/*jadclipse*/// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) radix(10) lradix(10) 

package java.util;

import java.io.*;
import java.security.AccessController;
import sun.misc.Hashing;
import sun.misc.VM;
import sun.security.action.GetPropertyAction;

// Referenced classes of package java.util:
//            AbstractMap, Arrays, Collection, Iterator, 
//            Map, Set, Objects, ConcurrentModificationException, 
//            NoSuchElementException, AbstractSet, AbstractCollection

public class HashMap extends AbstractMap
    implements Map, Cloneable, Serializable
{
    static class Entry
        implements Map.Entry
    {

        public final Object getKey()
        {
            return key;
        }

        public final Object getValue()
        {
            return value;
        }

        public final Object setValue(Object obj)
        {
            Object obj1 = value;
            value = obj;
            return obj1;
        }

.....
.....
.....

This is not the complete source code. However you can see it in your eclipse.

Hope this helps.

Regards,

Nikhil Naoghare.

Related Posts

  • Abstract Class In JAVA

    Hello Friends, This tutorial is for all the Java followers. One of the best feature that is widely used is the term ‘Abstract’. This term can be used as either class or a simple method. An abstract method is any method that is just declared but not instantiated. In other words one can just create…

  • Threads in Java.

    Hello Friends, This is the tutorial for the java developers. One of the most significance feature of core java is Threading. Threading deals with the processing of Threads in a single java program. Let us learn what actually are Threads. *What are Threads? Threads are independently running processes that are isolated from each other upto…

  • Collections In Java.

    Hello friends, Welcome to another tutorial for java followers. You all may have heard about Collections, it is one of the amazing feature in java. Collections are the object for the group of elements, these elements are nothing but the different data structures like as Array Lists, Linked Lists, Vectors, Hash tables,Hash List, Trees, Hash…

  • Maven Installation.

    Hello Friends, This is one of my tutorial for installation of Maven on windows. Maven is a software project management tool. Based on the concept of a project object model (POM), Maven can manage a project’s build, reporting and documentation from a central piece of information. Maven is an open source community and is a…

  • Jira Plugin Deployment.

    Hello Friends, This is one of the most important tutorial for all the jira developers. You may have heard about the plugins in jira which is a simple Java Archive File with .jar extension. This JAR file contains the class files and auxiliary resources associated with the applications. In Jira we can use Eclipse IDE…

One Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.