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.

1 thought on “Jadclipse decompiler plugin”

Leave a Comment

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.

Scroll to Top