Giter Site home page Giter Site logo

jd-gui's People

Contributors

alexey-lysiuk avatar alien-av avatar emmanue1 avatar lhaeger avatar md-5 avatar puspendubanerjee avatar simon04 avatar sschuberth avatar theuserbl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jd-gui's Issues

Problem with problematical classes

If you decompiler normal Java-classes, all works ok.
But if you decompile for example the Groovy generated class in your own jar-file in /jd/gui/App.class and scroll the generated source down, then it gives on the command line a lot of erros out (which is not the problem) AND maximizing or resizing the window have no effect for the parts in the window.
In other words: The parts in the window will not be updated. It only updates parts, if you scroll in the Textarea or the Tree.

Showing other text file types

I'm currently using JD to analyze a jar file that has some text files with unsupported extensions in it. For example, a file ending on .json can't be displayed in jd. Of course, I could just add a new TreeNodeFactory for this and create a pullreq. However, there are actually a lot of these custom files, and adding a special case for all of them is quite tedious. But just allowing to open any file with a plain text viewer might cause serious issues. So I'd suggest to implement a config option which allows to specify a list of extensions which can be opened with the text file viewer.

could not modify/edit java class files

Namaste,

I used jd-gui from santoku linux where they pre-packaged it to reverse engineer mobile apps and other forensic purpose.

I tried to open jar contents and tried to modify the class file content and the jd-gui it not allowing me to edit the files.

Is it how jd-gui works or do I need to make any changes in the jd-gui.

Can you please suggest any alternative where I could modify class files and recompile back to apk (android package) files ?

Thanks,
Kiran.

Linux: write jd-config.cfg under a 'dot-directory'

I noticed that after using jd-gui I have jd-gui.cfg file under my home directory. This file should be written under a different directory. To quote the XDG Base Directory Specification

$XDG_CONFIG_HOME defines the base directory relative to which user specific configuration files should be stored. If $XDG_CONFIG_HOME is either not set or empty, a default equal to $HOME/.config should be used.

Code displayed as error

I'm not sure if this is an issue in the JD-core or what, I didn't know where else to report it. In the last version and here now too in 1.0 I have 2 classes that show like this.

/* Error */
public void run()
{
  // Byte code:
  //   0: aload_0

I have no idea why there's being shown the error though.

Can't open the jd-gui.app on Mac

I download the app from here and your website. But both of them can't be opened. The OS reminds me I can't open it. So I have to use the jar.

build failed with latest update1a5b82a03b9f982121fca9a2bc18057fce67fc82

gradle build

FAILURE: Build failed with an exception.

  • Where:
    Build file '/opt/bin/jd-gui/build.gradle' line: 2

  • What went wrong:
    A problem occurred evaluating root project 'jd-gui'.

    Plugin with id 'distribution' not found.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 1.96 secs

jd-gui(java) or jd-eclipse decompile error

This is a struts2 action class. The method "outPut" can not decompile by jd-gui(java) and jd-eclipse, but jd-gui(win) success.

Java Class Version: 6 (50.0)
JD-Core Version: 0.7.1

package com.xxx.xs.purchase.web;

import java.io.PrintWriter;

import com.xxx.xs.common.core.web.BaseAction;


public class AgreementAction extends BaseAction {

    private void outPut(String msg) {
        getResponse().setCharacterEncoding("UTF-8");
        PrintWriter pw = null;
        try {
            pw = getResponse().getWriter();
            pw.write(msg);
            pw.flush();
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            if (pw != null) {
                pw.close();
            }
        }
    }
}

Command Line Params

it would be great if you could add support to command line params, this be useful for more guys.

Fonts

Please, make fonts configurable. Defaults are horrible..

feature request, single instance support

The old JD-Gui had a single instance feature, which made sure that any jar file opened would come up in a new tab instead of a new window. This is especially helpful when opening files via the file manager. Could something like this be implemented for the new version too?

JD-Core: Problem with String-Arrays created by Eclipse-Compiler

Here a little test program:

public class TestEclipse {
          public int[] myInt = { 14, 147, 87, 87, 78, 79, 78, 0, 17, 0, 15 };                                                                                                                                                            
          public String[] myString = { "Hello", "this", null, "are", "some", null, "words" };                                                                                                                                                                          private static final String[] myS2 = { "Hello", "this", null, "are", "some", null, "words" };                                                                                                                                                                
          private static final int[] myI2 = { 14, 147, 87, 87, 78, 79, 78, 0, 17, 0, 15 };

          public static void main(String[] args) {
                  System.out.println("Hello all!");
          }
}

Compile it with the JDK and decompile it with JD-GUI 1.0RC3 gives out the right thing:

import java.io.PrintStream;

public class TestEclipse
{
  public int[] myInt = { 14, 147, 87, 87, 78, 79, 78, 0, 17, 0, 15 };
  public String[] myString = { "Hello", "this", null, "are", "some", null, "words" };
  private static final String[] myS2 = { "Hello", "this", null, "are", "some", null, "words" };
  private static final int[] myI2 = { 14, 147, 87, 87, 78, 79, 78, 0, 17, 0, 15 };

  public TestEclipse() {}

  public static void main(String[] paramArrayOfString)
  {
    System.out.println("Hello all!");
  }
}

But compile it inside Eclipse (then the Eclipse-Compiler is used) and decompile it with JD-GUI gives out this one:

import java.io.PrintStream;

public class TestEclipse
{
  public int[] myInt = { 14, 147, 87, 87, 78, 79, 78, 0, 17, 015 };
  public String[] myString = { "Hello", "this", 0, "are", "some", 0"words" };
  private static final String[] myS2 = { "Hello", "this", 0, "are", "some", 0"words" };
  private static final int[] myI2 = { 14, 147, 87, 87, 78, 79, 78, 0, 17, 015 };

  public TestEclipse() {}

  public static void main(String[] args)
  {
    System.out.println("Hello all!");
  }
}

Incorrect decompilation for org.mortbay.start.Main

First of all, thanks for this software! It's a great piece of work and very helpful :-)

Here's the bug I discovered.
I tried to decompile the following class:
http://grepcode.com/file/repo1.maven.org/maven2/org.mortbay.jetty/start/6.1.23/org/mortbay/start/Main.java

The respective jar should be available here:
http://grepcode.com/snapshot/repo1.maven.org/maven2/org.mortbay.jetty/start/6.1.23/

I noticed that line numbering is incorrect in JD-IntelliJ and double-checked in JD-GUI. Then I noticed, that the decompiled source is not correct and thus the line number also fails.

It seems that between those two lines in the original (!) source, the decompiler becomes confused:

486  System.setProperty("java.class.path",_classpath.toString());
487 ClassLoader cl=_classpath.getClassLoader();

In JD-GUI the result of the decompilation looks like this:
jd-gui snapshot

Release Source for Native Version

Hi Emannuel,

Not sure what inspired you to rewrite jd-gui in Java, but have you considered open sourcing the old 0.3.5 version for posterity?

Thanks

Error launching JAR (UISingleInstancePreferencesProvider)

I get this error launching the jar file but the UI still comes up and is able to decompile Java/Class files.

[cloudera@quickstart jd-gui]$ java -jar ./build/libs/jd-gui-1.2.0.jar
Exception in thread "AWT-EventQueue-0" java.util.ServiceConfigurationError: org.jd.gui.spi.PreferencesPanel: Provider org.jd.gui.service.preferencespanel.UISingleInstancePreferencesProvider could not be instantiated
at java.util.ServiceLoader.fail(ServiceLoader.java:224)

Option for Tabs

I think in the preferences an Option for the tabs would be nice.

In JD-GUI < 1.0RC1 all are in one line.
In Java it would look like something like that
myTabbedPane.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);

Currently they are in multi-line. That is the default one in Java.
myTabbedPane.setTabLayoutPolicy(JTabbedPane.WRAP_TAB_LAYOUT);

Would be nice, to have an option in the preferences, to choose if the tabs should be in a single line or multi-line.

Option for Line Endings

Currently, if you save the decompiled files to Java-source files, the line endings are like on Linux/Unix ("\n").
But on Windows, you need carriage return and line feed ("\r\n"). So it would be nice, to have in the properties or so in JD-GUI an option, which line ending will be used for the decompiling.

Unable to open preferences nor save all sources

After the apps is freshly started, few seconds later, I have the following trace[1].
Then any attempt to open preferences or save all sources as ends up in another trace[2] without showing any dialog.

D.

[1]

    Exception in thread "pool-1-thread-1" java.util.ServiceConfigurationError: jd.gui.spi.PreferencesPanel: Provider jd.gui.service.preferencespanel.DirectoryIndexerPreferencesProvider could not be instantiated
            at java.util.ServiceLoader.fail(ServiceLoader.java:232)
            at java.util.ServiceLoader.access$100(ServiceLoader.java:185)
            at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:384)
            at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
            at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
            at org.codehaus.groovy.runtime.DefaultGroovyMethods.toList(DefaultGroovyMethods.java:2910)
            at org.codehaus.groovy.runtime.DefaultGroovyMethods.toList(DefaultGroovyMethods.java:2929)
            at org.codehaus.groovy.runtime.dgm$637.invoke(Unknown Source)
            at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:271)
            at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:53)
            at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
            at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
            at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)
            at jd.gui.service.preferencespanel.PreferencesPanelService.<init>(PreferencesPanelService.groovy:12)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
            at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
            at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
            at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77)
            at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:102)
            at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:57)
            at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:230)
            at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:234)
            at jd.gui.service.preferencespanel.PreferencesPanelService.getInstance(PreferencesPanelService.groovy)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:483)
            at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
            at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
            at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:1845)
            at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:3735)
            at org.codehaus.groovy.runtime.callsite.ClassMetaClassGetPropertySite.getProperty(ClassMetaClassGetPropertySite.java:48)
            at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:291)
            at jd.gui.controller.MainController$1.run(MainController.groovy:148)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
            at java.lang.Thread.run(Thread.java:745)
    Caused by: java.lang.VerifyError: Bad <init> method call from inside of a branch
    Exception Details:
      Location:
        jd/gui/service/preferencespanel/DirectoryIndexerPreferencesProvider.<init>()V @91: invokespecial
      Reason:
        Error exists in the bytecode
      Bytecode:
        0x0000000: b800 254c 04bd 0027 5903 2b12 2832 122a
        0x0000010: b900 3002 0053 5910 ff12 04b8 0036 2a5f
        0x0000020: ab00 0000 0000 0076 0000 0004 aca4 66ff
        0x0000030: 0000 002c e7e9 2bb5 0000 0041 0000 9b75
        0x0000040: 0000 005d 0013 85ff 0000 0066 5f5a 5903
        0x0000050: 3212 38b8 003c c000 385f 57b7 003f a700
        0x0000060: 425f 5a59 0332 1238 b800 3cc0 0038 5f59
        0x0000070: 0432 b800 455f 57b7 0048 a700 265f 5a57
        0x0000080: b700 4aa7 001d 5f5a 5903 32b8 0045 5f57
        0x0000090: b700 4da7 000d bb00 4f59 1251 b700 54bf
        0x00000a0: 5701 4d2c 1256 b800 3cc0 0056 2a5f b500
        0x00000b0: 582c 572b 1259 3212 5bb9 005e 0200 4e2d
        0x00000c0: 125b b800 3cc0 005b 2a5f b500 602d 572a
        0x00000d0: b600 643a 0419 042a 5fb5 0066 1904 572b
        0x00000e0: 1267 322a 2b12 6832 126a 2b12 6b32 2b12
        0x00000f0: 6c32 126e b200 70b8 0076 b900 7a03 0012
        0x0000100: 7cb9 007a 0300 b900 7e03 002b 127f 3212
        0x0000110: 2ab9 005e 0200 b900 8304 0057 2b12 8432
        0x0000120: 1286 b900 3002 003a 0519 0512 86b8 003c
        0x0000130: c000 862a 5fb5 0088 1905 572b 1289 322b
        0x0000140: 128a 322a b400 88b9 005e 0200 2ab9 007a
        0x0000150: 0300 572b 128b 322a 2ab4 0088 2b12 8c32
        0x0000160: 122a b900 5e02 00b9 0083 0400 572b 128d
        0x0000170: 322a b400 88b9 005e 0200 3a06 1906 125b
        0x0000180: b800 3cc0 005b 2a5f b500 8f19 0657 b1  
      Stackmap Table:
        full_frame(@76,{UninitializedThis,Object[#147]},{Object[#149],UninitializedThis})
        full_frame(@97,{UninitializedThis,Object[#147]},{Object[#149],UninitializedThis})
        full_frame(@125,{UninitializedThis,Object[#147]},{Object[#149],UninitializedThis})
        full_frame(@134,{UninitializedThis,Object[#147]},{Object[#149],UninitializedThis})
        full_frame(@150,{UninitializedThis,Object[#147]},{Object[#149],UninitializedThis})
        full_frame(@160,{Object[#2],Object[#147]},{Object[#149]})

            at java.lang.Class.getDeclaredConstructors0(Native Method)
            at java.lang.Class.privateGetDeclaredConstructors(Class.java:2658)
            at java.lang.Class.getConstructor0(Class.java:3062)
            at java.lang.Class.newInstance(Class.java:403)
            at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:380)
            ... 35 more

[2]

    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException: Cannot invoke method show() on null object
            at org.codehaus.groovy.runtime.NullObject.invokeMethod(NullObject.java:88)
            at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:45)
            at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
            at org.codehaus.groovy.runtime.callsite.NullCallSite.call(NullCallSite.java:32)
            at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
            at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
            at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
            at jd.gui.controller.MainController.onPreferences(MainController.groovy:289)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:483)
            at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
            at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
            at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:382)
            at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1017)
            at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66)
            at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:49)
            at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:149)
            at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:153)
            at jd.gui.controller.MainController$_show_closure5$_closure40.doCall(MainController.groovy:134)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:483)
            at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
            at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
            at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:292)
            at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1017)
            at groovy.lang.Closure.call(Closure.java:423)
            at groovy.lang.Closure.call(Closure.java:439)
            at groovy.swing.impl.DefaultAction.actionPerformed(DefaultAction.java:38)
            at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
            at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2346)
            at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
            at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
            at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
            at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:833)
            at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:877)
            at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
            at java.awt.Component.processMouseEvent(Component.java:6525)
            at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
            at java.awt.Component.processEvent(Component.java:6290)
            at java.awt.Container.processEvent(Container.java:2234)
            at java.awt.Component.dispatchEventImpl(Component.java:4881)
            at java.awt.Container.dispatchEventImpl(Container.java:2292)
            at java.awt.Component.dispatchEvent(Component.java:4703)
            at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4898)
            at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4533)
            at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4462)
            at java.awt.Container.dispatchEventImpl(Container.java:2278)
            at java.awt.Window.dispatchEventImpl(Window.java:2739)
            at java.awt.Component.dispatchEvent(Component.java:4703)
            at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:746)
            at java.awt.EventQueue.access$400(EventQueue.java:97)
            at java.awt.EventQueue$3.run(EventQueue.java:697)
            at java.awt.EventQueue$3.run(EventQueue.java:691)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
            at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86)
            at java.awt.EventQueue$4.run(EventQueue.java:719)
            at java.awt.EventQueue$4.run(EventQueue.java:717)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:716)
            at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
            at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

Make the Mac app take files as parameter

Hello,
I love the jd project, but I wish I could open the jar files from the Mac finder directly by double clicking on it.
But when I associated tje .jar with the JD-GUI.app, and try to open a jar, it brings the app to front but do nothing. Does not open the jar in the app.
This would be great.

By the way I cannot find the online decompiler, did you remove it ?

"// INTERNAL ERROR //" - glitch

When i decompile some jar files i get greeted with // INTERNAL ERROR // like its encoded or encrypted but your jd-gui is suppose to decompile it.

xdg-icon-resource: file './jd_icon_128.png' does not exist

Built RPM successfully, but on install I get an error about a missing png:

./gradlew buildRpm

[cloudera@quickstart jd-gui]$ sudo rpm -ivh ./build/distributions/jd-gui-1.2.0.noarch.rpm
Preparing... ########################################### [100%]
1:jd-gui ########################################### [100%]
xdg-icon-resource: file './jd_icon_128.png' does not exist

Save All Sources does not work, zip file is not created

"Save All Sources" does not work with 1.0.0-RC1. After the location of the zip file has been chosen, the dialog with the progress bar appears, but nothing happens anymore. No progress at all and the close button does not react. jd-gui did create a temporary zip file in the temp directory, but the file size stays at 22 bytes and unzip reports that it is empty. It is possible to close the dialog using the close button of the window manager though.

I tried Java 7 and Java 8 as runtime executed on a 64-bit Linux.

[feature-request] CLI for saving all sources

First of all, thank you for your work on jd-gui!

My primary use case of jd-gui is decompilation of Android jar files to readable source code for auditing purposes. The Save All Sources option is already a gem, but it is quite repetive work.

Would it be possible to add a CLI entry point/option for this option?

Proposed options:

  • -z some-src.zip: writes the sources for given jar(s?) to some-src.zip
  • -d dir: writes the sources for given jar(s?) into a directory.

Some other projects that wraps around a jd interface (linked from Stackoverflow):

JD GUI crash

Crash when closing 2-3 openned JAR files.
Windows 7 64-bit Ultimate - x64 Hardware

Faulting application name: jd-gui.exe, version: 0.0.0.0, time stamp: 0x53ef61f6
Faulting module name: jd-gui.exe, version: 0.0.0.0, time stamp: 0x53ef61f6
Exception code: 0xc0000005
Fault offset: 0x00054c93
Faulting process id: 0x7bc
Faulting application start time: 0x01d0b29c764b5bea
Report Id: cc59fa59-1e8f-11e5-858a-b99843446341

Can't open file in v1.3

I download the version 1.3 from the website. The deb file and installed it successfully on my Ubuntu machine. When I open the program and click open file nothing happens. No window for file selection is popping up neither the drag-and-drop is working. What have I done wrong?

Possible issue with a large quantity of class files

Note 1: The C++ version had a similar issue and wouldn't display the + sign next to the large directory.
Note 2: I'm stuck at Java 7 67, so that may affect the issue.

I have a large codebase with about 58,000 files, mostly class files and about 140 jar files. One directory has about 27,000 files, mostly class files no jars. When jd-gui tries to open something in that codebase, it never displays in the source code window, the tree window does appear to work.

I have a smaller codebase for a different project with about 18,000 files. That works fine.

Errors during 'save all sources'

With git-head 55c4321
Decompiling of jar seems to work, but 'save all sources' causes:

Undefined type catch
java.lang.Throwable: NameGenerator.generateParameterNameFromSignature: invalid signature 'TT;'
        at jd.core.process.analyzer.variable.DefaultVariableNameGenerator.generateLocalVariableNameFromSignature(DefaultVariableNameGenerator.java:106)
        at jd.core.process.analyzer.classfile.LocalVariableAnalyzer.GenerateLocalVariableNames(LocalVariableAnalyzer.java:1733)
        at jd.core.process.analyzer.classfile.LocalVariableAnalyzer.Analyze(LocalVariableAnalyzer.java:206)
        at jd.core.process.analyzer.classfile.ClassFileAnalyzer.PreAnalyzeMethods(ClassFileAnalyzer.java:698)
        at jd.core.process.analyzer.classfile.ClassFileAnalyzer.AnalyzeClass(ClassFileAnalyzer.java:126)
        at jd.core.process.analyzer.classfile.ClassFileAnalyzer.Analyze(ClassFileAnalyzer.java:84)
        at jd.core.process.DecompilerImpl.decompile(DecompilerImpl.java:37)
        at jd.gui.service.sourcesaver.ClassFileSourceSaverProvider.save(ClassFileSourceSaverProvider.java:83)
        at jd.gui.service.sourcesaver.DirectorySourceSaverProvider.save(DirectorySourceSaverProvider.groovy:55)
        at sun.reflect.GeneratedMethodAccessor60.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:207)
        at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:56)
        at jd.gui.service.sourcesaver.PackageSourceSaverProvider.save(PackageSourceSaverProvider.groovy:19)
        at jd.gui.service.sourcesaver.DirectorySourceSaverProvider.save(DirectorySourceSaverProvider.groovy:55)
        at sun.reflect.GeneratedMethodAccessor60.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:207)
        at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:56)
        at jd.gui.service.sourcesaver.PackageSourceSaverProvider.save(PackageSourceSaverProvider.groovy:19)
        at jd.gui.service.sourcesaver.DirectorySourceSaverProvider.save(DirectorySourceSaverProvider.groovy:55)
        at sun.reflect.GeneratedMethodAccessor60.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:207)
        at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:56)
        at jd.gui.service.sourcesaver.PackageSourceSaverProvider.save(PackageSourceSaverProvider.groovy:19)
        at jd.gui.service.sourcesaver.DirectorySourceSaverProvider.save(DirectorySourceSaverProvider.groovy:55)
        at sun.reflect.GeneratedMethodAccessor60.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:207)
        at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:56)
        at jd.gui.service.sourcesaver.PackageSourceSaverProvider.save(PackageSourceSaverProvider.groovy:19)
        at jd.gui.service.sourcesaver.DirectorySourceSaverProvider.save(DirectorySourceSaverProvider.groovy:55)
        at sun.reflect.GeneratedMethodAccessor60.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:207)
        at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:56)
        at jd.gui.service.sourcesaver.PackageSourceSaverProvider.save(PackageSourceSaverProvider.groovy:19)
        at jd.gui.service.sourcesaver.DirectorySourceSaverProvider.save(DirectorySourceSaverProvider.groovy:55)
        at sun.reflect.GeneratedMethodAccessor60.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:207)
        at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:56)
        at jd.gui.service.sourcesaver.PackageSourceSaverProvider.save(PackageSourceSaverProvider.groovy:19)
        at jd.gui.service.sourcesaver.DirectorySourceSaverProvider.save(DirectorySourceSaverProvider.groovy:55)
        at sun.reflect.GeneratedMethodAccessor60.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:207)
        at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:56)
        at jd.gui.service.sourcesaver.PackageSourceSaverProvider.save(PackageSourceSaverProvider.groovy:19)
        at jd.gui.service.sourcesaver.DirectorySourceSaverProvider.save(DirectorySourceSaverProvider.groovy:55)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:207)
        at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:56)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:49)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:149)
        at jd.gui.service.sourcesaver.DirectorySourceSaverProvider.save(DirectorySourceSaverProvider.groovy:38)
        at jd.gui.service.sourcesaver.ZipFileSourceSaverProvider.save(ZipFileSourceSaverProvider.groovy:38)
        at jd.gui.spi.SourceSaver$save$1.call(Unknown Source)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callSafe(AbstractCallSite.java:68)
        at jd.gui.service.mainpanel.ContainerPanelFactoryProvider$ContainerPanel.save(ContainerPanelFactoryProvider.groovy:104)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSite.invoke(PogoMetaMethodSite.java:166)
        at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.call(PogoMetaMethodSite.java:68)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:144)
        at jd.gui.controller.SaveAllSourcesController$1.run(SaveAllSourcesController.groovy:60)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Undefined type catch
Undefined type catch
Undefined type catch
ConstantPool.addConstantClass: invalid name index
ConstantPool.addConstantClass: invalid name index
ConstantPool.addConstantClass: invalid name index
Undefined type catch
Undefined type catch
Undefined type catch
Undefined type catch
Undefined type catch
Undefined type catch
Undefined type catch
Undefined type catch
java.lang.Throwable: NameGenerator.generateParameterNameFromSignature: invalid signature 'TE;'
        at jd.core.process.analyzer.variable.DefaultVariableNameGenerator.generateLocalVariableNameFromSignature(DefaultVariableNameGenerator.java:106)
        at jd.core.process.analyzer.classfile.LocalVariableAnalyzer.GenerateLocalVariableNames(LocalVariableAnalyzer.java:1733)
        at jd.core.process.analyzer.classfile.LocalVariableAnalyzer.Analyze(LocalVariableAnalyzer.java:206)
        at jd.core.process.analyzer.classfile.ClassFileAnalyzer.PreAnalyzeMethods(ClassFileAnalyzer.java:698)
        at jd.core.process.analyzer.classfile.ClassFileAnalyzer.AnalyzeClass(ClassFileAnalyzer.java:126)
        at jd.core.process.analyzer.classfile.ClassFileAnalyzer.Analyze(ClassFileAnalyzer.java:84)
        at jd.core.process.DecompilerImpl.decompile(DecompilerImpl.java:37)
        at jd.gui.service.sourcesaver.ClassFileSourceSaverProvider.save(ClassFileSourceSaverProvider.java:83)
        at jd.gui.service.sourcesaver.DirectorySourceSaverProvider.save(DirectorySourceSaverProvider.groovy:55)
        at sun.reflect.GeneratedMethodAccessor60.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:207)
        at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:56)
        at jd.gui.service.sourcesaver.PackageSourceSaverProvider.save(PackageSourceSaverProvider.groovy:19)
        at jd.gui.service.sourcesaver.DirectorySourceSaverProvider.save(DirectorySourceSaverProvider.groovy:55)
        at sun.reflect.GeneratedMethodAccessor60.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:207)
        at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:56)
        at jd.gui.service.sourcesaver.PackageSourceSaverProvider.save(PackageSourceSaverProvider.groovy:19)
        at jd.gui.service.sourcesaver.DirectorySourceSaverProvider.save(DirectorySourceSaverProvider.groovy:55)
        at sun.reflect.GeneratedMethodAccessor60.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:207)
        at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:56)
        at jd.gui.service.sourcesaver.PackageSourceSaverProvider.save(PackageSourceSaverProvider.groovy:19)
        at jd.gui.service.sourcesaver.DirectorySourceSaverProvider.save(DirectorySourceSaverProvider.groovy:55)
        at sun.reflect.GeneratedMethodAccessor60.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:207)
        at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:56)
        at jd.gui.service.sourcesaver.PackageSourceSaverProvider.save(PackageSourceSaverProvider.groovy:19)
        at jd.gui.service.sourcesaver.DirectorySourceSaverProvider.save(DirectorySourceSaverProvider.groovy:55)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:207)
        at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:56)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:49)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:149)
        at jd.gui.service.sourcesaver.DirectorySourceSaverProvider.save(DirectorySourceSaverProvider.groovy:38)
        at jd.gui.service.sourcesaver.ZipFileSourceSaverProvider.save(ZipFileSourceSaverProvider.groovy:38)
        at jd.gui.spi.SourceSaver$save$1.call(Unknown Source)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callSafe(AbstractCallSite.java:68)
        at jd.gui.service.mainpanel.ContainerPanelFactoryProvider$ContainerPanel.save(ContainerPanelFactoryProvider.groovy:104)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSite.invoke(PogoMetaMethodSite.java:166)
        at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.call(PogoMetaMethodSite.java:68)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:144)
        at jd.gui.controller.SaveAllSourcesController$1.run(SaveAllSourcesController.groovy:60)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Undefined type catch
Undefined type catch
Undefined type catch
Undefined type catch
Undefined type catch
Undefined type catch
Undefined type catch
Undefined type catch
Undefined type catch
Undefined type catch
Undefined type catch
Undefined type catch
Undefined type catch

System is Ubuntu-14.04, and java version:

java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)

Byte Code Error?

I had lost some source code when I had a computer crash a few days ago, but I still had the compiled code, so I used this tool. It failed to decompile two of my files, the commonalities being that they both held try/catch statements, and they both attempted to extract data from a jar file for uses elsewhere (AppSupportExporter copies the data, SoundHandler plays sound clips). I also looked at the byte code and it seemed that the decompiler error occurred at the try/catch statement. Please see what caused this fault, my decompiler error results are below. It might be used for possible updates?

Class file extracts information from a jar file and exports it to the user's home directory/Library/Application Support (built for Mac OSX):

package com.crump.karelearning.start;

public class AppSupportExporter
{
  /* Error */
  public AppSupportExporter(String resourceName, String destination)
  {
    // Byte code:
    //   0: aload_0
    //   1: invokespecial 8 java/lang/Object:<init> ()V
    //   4: aconst_null
    //   5: astore_3
    //   6: aconst_null
    //   7: astore 4
    //   9: ldc 1
    //   11: aload_1
    //   12: invokevirtual 11   java/lang/Class:getResourceAsStream (Ljava/lang/String;)Ljava/io/InputStream;
    //   15: astore_3
    //   16: aload_3
    //   17: ifnonnull +32 -> 49
    //   20: new 17 java/lang/Exception
    //   23: dup
    //   24: new 19 java/lang/StringBuilder
    //   27: dup
    //   28: ldc 21
    //   30: invokespecial 23   java/lang/StringBuilder:<init>  (Ljava/lang/String;)V
    //   33: aload_1
    //   34: invokevirtual 26   java/lang/StringBuilder:append  (Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   37: ldc 30
    //   39: invokevirtual 26   java/lang/StringBuilder:append  (Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   42: invokevirtual 32   java/lang/StringBuilder:toString    ()Ljava/lang/String;
    //   45: invokespecial 36   java/lang/Exception:<init>  (Ljava/lang/String;)V
    //   48: athrow
    //   49: sipush 4096
    //   52: newarray <illegal type>
    //   54: astore 6
    //   56: aload_2
    //   57: ldc 37
    //   59: invokevirtual 39   java/lang/String:equals (Ljava/lang/Object;)Z
    //   62: ifeq +38 -> 100
    //   65: new 45 java/io/FileOutputStream
    //   68: dup
    //   69: new 19 java/lang/StringBuilder
    //   72: dup
    //   73: ldc 47
    //   75: invokestatic 49    java/lang/System:getProperty    (Ljava/lang/String;)Ljava/lang/String;
    //   78: invokestatic 55    java/lang/String:valueOf    (Ljava/lang/Object;)Ljava/lang/String;
    //   81: invokespecial 23   java/lang/StringBuilder:<init>  (Ljava/lang/String;)V
    //   84: ldc 59
    //   86: invokevirtual 26   java/lang/StringBuilder:append  (Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   89: invokevirtual 32   java/lang/StringBuilder:toString    ()Ljava/lang/String;
    //   92: invokespecial 61   java/io/FileOutputStream:<init> (Ljava/lang/String;)V
    //   95: astore 4
    //   97: goto +26 -> 123
    //   100: new 45    java/io/FileOutputStream
    //   103: dup
    //   104: aload_2
    //   105: invokespecial 61  java/io/FileOutputStream:<init> (Ljava/lang/String;)V
    //   108: astore 4
    //   110: goto +13 -> 123
    //   113: aload 4
    //   115: aload 6
    //   117: iconst_0
    //   118: iload 5
    //   120: invokevirtual 62  java/io/OutputStream:write  ([BII)V
    //   123: aload_3
    //   124: aload 6
    //   126: invokevirtual 68  java/io/InputStream:read    ([B)I
    //   129: dup
    //   130: istore 5
    //   132: ifgt -19 -> 113
    //   135: goto +56 -> 191
    //   138: astore 5
    //   140: aload 5
    //   142: invokevirtual 74  java/lang/Exception:printStackTrace ()V
    //   145: aload_3
    //   146: invokevirtual 77  java/io/InputStream:close   ()V
    //   149: aload 4
    //   151: invokevirtual 80  java/io/OutputStream:close  ()V
    //   154: goto +56 -> 210
    //   157: astore 8
    //   159: aload 8
    //   161: invokevirtual 81  java/io/IOException:printStackTrace ()V
    //   164: goto +46 -> 210
    //   167: astore 7
    //   169: aload_3
    //   170: invokevirtual 77  java/io/InputStream:close   ()V
    //   173: aload 4
    //   175: invokevirtual 80  java/io/OutputStream:close  ()V
    //   178: goto +10 -> 188
    //   181: astore 8
    //   183: aload 8
    //   185: invokevirtual 81  java/io/IOException:printStackTrace ()V
    //   188: aload 7
    //   190: athrow
    //   191: aload_3
    //   192: invokevirtual 77  java/io/InputStream:close   ()V
    //   195: aload 4
    //   197: invokevirtual 80  java/io/OutputStream:close  ()V
    //   200: goto +10 -> 210
    //   203: astore 8
    //   205: aload 8
    //   207: invokevirtual 81  java/io/IOException:printStackTrace ()V
    //   210: return
    // Line number table:
    //   Java source line #13   -> byte code offset #0
    //   Java source line #14   -> byte code offset #4
    //   Java source line #15   -> byte code offset #6
    //   Java source line #17   -> byte code offset #9
    //   Java source line #18   -> byte code offset #16
    //   Java source line #19   -> byte code offset #20
    //   Java source line #23   -> byte code offset #49
    //   Java source line #24   -> byte code offset #56
    //   Java source line #25   -> byte code offset #65
    //   Java source line #27   -> byte code offset #100
    //   Java source line #28   -> byte code offset #110
    //   Java source line #29   -> byte code offset #113
    //   Java source line #28   -> byte code offset #123
    //   Java source line #31   -> byte code offset #135
    //   Java source line #32   -> byte code offset #140
    //   Java source line #35   -> byte code offset #145
    //   Java source line #36   -> byte code offset #149
    //   Java source line #37   -> byte code offset #154
    //   Java source line #38   -> byte code offset #159
    //   Java source line #33   -> byte code offset #167
    //   Java source line #35   -> byte code offset #169
    //   Java source line #36   -> byte code offset #173
    //   Java source line #37   -> byte code offset #178
    //   Java source line #38   -> byte code offset #183
    //   Java source line #40   -> byte code offset #188
    //   Java source line #35   -> byte code offset #191
    //   Java source line #36   -> byte code offset #195
    //   Java source line #37   -> byte code offset #200
    //   Java source line #38   -> byte code offset #205
    //   Java source line #41   -> byte code offset #210
    // Local variable table:
    //   start  length  slot    name    signature
    //   0  211 0   this    AppSupportExporter
    //   0  211 1   resourceName    String
    //   0  211 2   destination String
    //   5  187 3   stream  java.io.InputStream
    //   7  189 4   resStreamOut    java.io.OutputStream
    //   113    6   5   readBytes   int
    //   130    3   5   readBytes   int
    //   138    3   5   ex  Exception
    //   54 71  6   buffer  byte[]
    //   167    22  7   localObject Object
    //   157    3   8   e   java.io.IOException
    //   181    3   8   e   java.io.IOException
    //   203    3   8   e   java.io.IOException
    // Exception table:
    //   from   to  target  type
    //   9  135 138 java/lang/Exception
    //   145    154 157 java/io/IOException
    //   9  145 167 finally
    //   169    178 181 java/io/IOException
    //   191    200 203 java/io/IOException
  }
}

Extracts a sound file from the jar file that the running main class is located within and plays it or loads it in for future use (because the first attempt to play it fails if not loaded in):

package com.crump.karelearning;

import java.net.URL;

public class SoundHandler
{
  public SoundHandler(String filename)
  {
    new Thread(new Runnable()
    {
      private final int EXTERNAL_BUFFER_SIZE = 524288;
      private URL soundFile;

      /* Error */
      public void run()
      {
        // Byte code:
        //   0: aload_0
        //   1: getfield 50 com/crump/karelearning/SoundHandler$1:soundFile Ljava/net/URL;
        //   4: invokevirtual 57    java/net/URL:openConnection ()Ljava/net/URLConnection;
        //   7: invokevirtual 63    java/net/URLConnection:connect  ()V
        //   10: aload_0
        //   11: getfield 50    com/crump/karelearning/SoundHandler$1:soundFile Ljava/net/URL;
        //   14: invokevirtual 68   java/net/URL:openStream ()Ljava/io/InputStream;
        //   17: invokevirtual 72   java/io/InputStream:close   ()V
        //   20: goto +5 -> 25
        //   23: astore_1
        //   24: return
        //   25: aconst_null
        //   26: astore_1
        //   27: aload_0
        //   28: getfield 50    com/crump/karelearning/SoundHandler$1:soundFile Ljava/net/URL;
        //   31: invokestatic 77    javax/sound/sampled/AudioSystem:getAudioInputStream (Ljava/net/URL;)Ljavax/sound/sampled/AudioInputStream;
        //   34: astore_1
        //   35: goto +7 -> 42
        //   38: astore_2
        //   39: return
        //   40: astore_2
        //   41: return
        //   42: aload_1
        //   43: invokevirtual 83   javax/sound/sampled/AudioInputStream:getFormat  ()Ljavax/sound/sampled/AudioFormat;
        //   46: astore_2
        //   47: aconst_null
        //   48: astore_3
        //   49: new 89 javax/sound/sampled/DataLine$Info
        //   52: dup
        //   53: ldc 91
        //   55: aload_2
        //   56: invokespecial 93   javax/sound/sampled/DataLine$Info:<init>    (Ljava/lang/Class;Ljavax/sound/sampled/AudioFormat;)V
        //   59: astore 4
        //   61: aload 4
        //   63: invokestatic 96    javax/sound/sampled/AudioSystem:getLine (Ljavax/sound/sampled/Line$Info;)Ljavax/sound/sampled/Line;
        //   66: checkcast 91   javax/sound/sampled/SourceDataLine
        //   69: astore_3
        //   70: aload_3
        //   71: aload_2
        //   72: invokeinterface 100 2 0
        //   77: goto +9 -> 86
        //   80: astore 5
        //   82: return
        //   83: astore 5
        //   85: return
        //   86: aload_3
        //   87: invokeinterface 104 1 0
        //   92: iconst_0
        //   93: istore 5
        //   95: ldc 10
        //   97: newarray <illegal type>
        //   99: astore 6
        //   101: goto +32 -> 133
        //   104: aload_1
        //   105: aload 6
        //   107: iconst_0
        //   108: aload 6
        //   110: arraylength
        //   111: invokevirtual 107 javax/sound/sampled/AudioInputStream:read   ([BII)I
        //   114: istore 5
        //   116: iload 5
        //   118: iflt +15 -> 133
        //   121: aload_3
        //   122: aload 6
        //   124: iconst_0
        //   125: iload 5
        //   127: invokeinterface 111 4 0
        //   132: pop
        //   133: iload 5
        //   135: iconst_m1
        //   136: if_icmpne -32 -> 104
        //   139: goto +35 -> 174
        //   142: astore 7
        //   144: aload_3
        //   145: invokeinterface 114 1 0
        //   150: aload_3
        //   151: invokeinterface 117 1 0
        //   156: return
        //   157: astore 8
        //   159: aload_3
        //   160: invokeinterface 114 1 0
        //   165: aload_3
        //   166: invokeinterface 117 1 0
        //   171: aload 8
        //   173: athrow
        //   174: aload_3
        //   175: invokeinterface 114 1 0
        //   180: aload_3
        //   181: invokeinterface 117 1 0
        //   186: return
        // Line number table:
        //   Java source line #29   -> byte code offset #0
        //   Java source line #30   -> byte code offset #10
        //   Java source line #31   -> byte code offset #20
        //   Java source line #32   -> byte code offset #24
        //   Java source line #34   -> byte code offset #25
        //   Java source line #37   -> byte code offset #27
        //   Java source line #36   -> byte code offset #34
        //   Java source line #38   -> byte code offset #35
        //   Java source line #39   -> byte code offset #39
        //   Java source line #40   -> byte code offset #40
        //   Java source line #41   -> byte code offset #41
        //   Java source line #43   -> byte code offset #42
        //   Java source line #44   -> byte code offset #47
        //   Java source line #45   -> byte code offset #49
        //   Java source line #46   -> byte code offset #55
        //   Java source line #45   -> byte code offset #56
        //   Java source line #48   -> byte code offset #61
        //   Java source line #49   -> byte code offset #70
        //   Java source line #50   -> byte code offset #77
        //   Java source line #51   -> byte code offset #82
        //   Java source line #52   -> byte code offset #83
        //   Java source line #53   -> byte code offset #85
        //   Java source line #55   -> byte code offset #86
        //   Java source line #56   -> byte code offset #92
        //   Java source line #57   -> byte code offset #95
        //   Java source line #59   -> byte code offset #101
        //   Java source line #60   -> byte code offset #104
        //   Java source line #61   -> byte code offset #108
        //   Java source line #60   -> byte code offset #111
        //   Java source line #62   -> byte code offset #116
        //   Java source line #63   -> byte code offset #121
        //   Java source line #59   -> byte code offset #133
        //   Java source line #66   -> byte code offset #139
        //   Java source line #69   -> byte code offset #144
        //   Java source line #70   -> byte code offset #150
        //   Java source line #67   -> byte code offset #156
        //   Java source line #68   -> byte code offset #157
        //   Java source line #69   -> byte code offset #159
        //   Java source line #70   -> byte code offset #165
        //   Java source line #71   -> byte code offset #171
        //   Java source line #69   -> byte code offset #174
        //   Java source line #70   -> byte code offset #180
        //   Java source line #72   -> byte code offset #186
        // Local variable table:
        //   start  length  slot    name    signature
        //   0  187 0   this    1
        //   23 2   1   e   Exception
        //   26 79  1   audioInputStream    javax.sound.sampled.AudioInputStream
        //   38 2   2   e   javax.sound.sampled.UnsupportedAudioFileException
        //   40 2   2   e   java.io.IOException
        //   46 26  2   format  javax.sound.sampled.AudioFormat
        //   48 133 3   auline  javax.sound.sampled.SourceDataLine
        //   59 3   4   info    javax.sound.sampled.DataLine.Info
        //   80 3   5   e   javax.sound.sampled.LineUnavailableException
        //   83 3   5   e   Exception
        //   93 41  5   nBytesRead  int
        //   99 24  6   abData  byte[]
        //   142    3   7   e   java.io.IOException
        //   157    15  8   localObject Object
        // Exception table:
        //   from   to  target  type
        //   0  20  23  java/lang/Exception
        //   27 35  38  javax/sound/sampled/UnsupportedAudioFileException
        //   27 35  40  java/io/IOException
        //   61 77  80  javax/sound/sampled/LineUnavailableException
        //   61 77  83  java/lang/Exception
        //   101    139 142 java/io/IOException
        //   101    144 157 finally
      }
    })

      .start();
  }

  protected SoundHandler(String filename, boolean x)
  {
    new Thread(new Runnable()
    {
      private final int EXTERNAL_BUFFER_SIZE = 524288;
      private URL soundFile = KarelKeyListener.class
        .getResource("/resources/bzzt.wav");

      /* Error */
      public void run()
      {
        // Byte code:
        //   0: aload_0
        //   1: getfield 35 com/crump/karelearning/SoundHandler$2:soundFile Ljava/net/URL;
        //   4: invokevirtual 42    java/net/URL:openConnection ()Ljava/net/URLConnection;
        //   7: invokevirtual 48    java/net/URLConnection:connect  ()V
        //   10: aload_0
        //   11: getfield 35    com/crump/karelearning/SoundHandler$2:soundFile Ljava/net/URL;
        //   14: invokevirtual 53   java/net/URL:openStream ()Ljava/io/InputStream;
        //   17: invokevirtual 57   java/io/InputStream:close   ()V
        //   20: goto +5 -> 25
        //   23: astore_1
        //   24: return
        //   25: aconst_null
        //   26: astore_1
        //   27: aload_0
        //   28: getfield 35    com/crump/karelearning/SoundHandler$2:soundFile Ljava/net/URL;
        //   31: invokestatic 62    javax/sound/sampled/AudioSystem:getAudioInputStream (Ljava/net/URL;)Ljavax/sound/sampled/AudioInputStream;
        //   34: astore_1
        //   35: goto +7 -> 42
        //   38: astore_2
        //   39: return
        //   40: astore_2
        //   41: return
        //   42: aload_1
        //   43: invokevirtual 68   javax/sound/sampled/AudioInputStream:getFormat  ()Ljavax/sound/sampled/AudioFormat;
        //   46: astore_2
        //   47: aconst_null
        //   48: astore_3
        //   49: new 74 javax/sound/sampled/DataLine$Info
        //   52: dup
        //   53: ldc 76
        //   55: aload_2
        //   56: invokespecial 78   javax/sound/sampled/DataLine$Info:<init>    (Ljava/lang/Class;Ljavax/sound/sampled/AudioFormat;)V
        //   59: astore 4
        //   61: aload 4
        //   63: invokestatic 81    javax/sound/sampled/AudioSystem:getLine (Ljavax/sound/sampled/Line$Info;)Ljavax/sound/sampled/Line;
        //   66: checkcast 76   javax/sound/sampled/SourceDataLine
        //   69: astore_3
        //   70: aload_3
        //   71: aload_2
        //   72: invokeinterface 85 2 0
        //   77: goto +9 -> 86
        //   80: astore 5
        //   82: return
        //   83: astore 5
        //   85: return
        //   86: iconst_0
        //   87: istore 5
        //   89: ldc 10
        //   91: newarray <illegal type>
        //   93: astore 6
        //   95: goto +32 -> 127
        //   98: aload_1
        //   99: aload 6
        //   101: iconst_0
        //   102: aload 6
        //   104: arraylength
        //   105: invokevirtual 89  javax/sound/sampled/AudioInputStream:read   ([BII)I
        //   108: istore 5
        //   110: iload 5
        //   112: iflt +15 -> 127
        //   115: aload_3
        //   116: aload 6
        //   118: iconst_0
        //   119: iload 5
        //   121: invokeinterface 93 4 0
        //   126: pop
        //   127: iload 5
        //   129: iconst_m1
        //   130: if_icmpne -32 -> 98
        //   133: goto +35 -> 168
        //   136: astore 7
        //   138: aload_3
        //   139: invokeinterface 96 1 0
        //   144: aload_3
        //   145: invokeinterface 99 1 0
        //   150: return
        //   151: astore 8
        //   153: aload_3
        //   154: invokeinterface 96 1 0
        //   159: aload_3
        //   160: invokeinterface 99 1 0
        //   165: aload 8
        //   167: athrow
        //   168: aload_3
        //   169: invokeinterface 96 1 0
        //   174: aload_3
        //   175: invokeinterface 99 1 0
        //   180: return
        // Line number table:
        //   Java source line #95   -> byte code offset #0
        //   Java source line #96   -> byte code offset #10
        //   Java source line #97   -> byte code offset #20
        //   Java source line #98   -> byte code offset #24
        //   Java source line #100  -> byte code offset #25
        //   Java source line #103  -> byte code offset #27
        //   Java source line #102  -> byte code offset #34
        //   Java source line #104  -> byte code offset #35
        //   Java source line #105  -> byte code offset #39
        //   Java source line #106  -> byte code offset #40
        //   Java source line #107  -> byte code offset #41
        //   Java source line #109  -> byte code offset #42
        //   Java source line #110  -> byte code offset #47
        //   Java source line #111  -> byte code offset #49
        //   Java source line #112  -> byte code offset #55
        //   Java source line #111  -> byte code offset #56
        //   Java source line #114  -> byte code offset #61
        //   Java source line #115  -> byte code offset #70
        //   Java source line #116  -> byte code offset #77
        //   Java source line #117  -> byte code offset #82
        //   Java source line #118  -> byte code offset #83
        //   Java source line #119  -> byte code offset #85
        //   Java source line #121  -> byte code offset #86
        //   Java source line #122  -> byte code offset #89
        //   Java source line #124  -> byte code offset #95
        //   Java source line #125  -> byte code offset #98
        //   Java source line #126  -> byte code offset #102
        //   Java source line #125  -> byte code offset #105
        //   Java source line #127  -> byte code offset #110
        //   Java source line #128  -> byte code offset #115
        //   Java source line #124  -> byte code offset #127
        //   Java source line #131  -> byte code offset #133
        //   Java source line #134  -> byte code offset #138
        //   Java source line #135  -> byte code offset #144
        //   Java source line #132  -> byte code offset #150
        //   Java source line #133  -> byte code offset #151
        //   Java source line #134  -> byte code offset #153
        //   Java source line #135  -> byte code offset #159
        //   Java source line #136  -> byte code offset #165
        //   Java source line #134  -> byte code offset #168
        //   Java source line #135  -> byte code offset #174
        //   Java source line #137  -> byte code offset #180
        // Local variable table:
        //   start  length  slot    name    signature
        //   0  181 0   this    2
        //   23 2   1   e   Exception
        //   26 73  1   audioInputStream    javax.sound.sampled.AudioInputStream
        //   38 2   2   e   javax.sound.sampled.UnsupportedAudioFileException
        //   40 2   2   e   java.io.IOException
        //   46 26  2   format  javax.sound.sampled.AudioFormat
        //   48 127 3   auline  javax.sound.sampled.SourceDataLine
        //   59 3   4   info    javax.sound.sampled.DataLine.Info
        //   80 3   5   e   javax.sound.sampled.LineUnavailableException
        //   83 3   5   e   Exception
        //   87 41  5   nBytesRead  int
        //   93 24  6   abData  byte[]
        //   136    3   7   e   java.io.IOException
        //   151    15  8   localObject Object
        // Exception table:
        //   from   to  target  type
        //   0  20  23  java/lang/Exception
        //   27 35  38  javax/sound/sampled/UnsupportedAudioFileException
        //   27 35  40  java/io/IOException
        //   61 77  80  javax/sound/sampled/LineUnavailableException
        //   61 77  83  java/lang/Exception
        //   95 133 136 java/io/IOException
        //   95 138 151 finally
      }
    })

      .start();
  }
}

JD-Core: Problem with importing subclasses

Here a little source code:

package pkg;

public class MainClass {
  public MainClass() {}

  public void someFunction() {
    System.out.println("Some function");
  }

  public SubClass subby() {
    return new SubClass();
  }

  public class SubClass {
    public SubClass () {}

    public void someSubFunction() {
      System.out.println("Some sub-function");
    }
  }

}
package pkg;

public class ThirdClass {
  public ThirdClass() {}

  public MainClass.SubClass getIt() {
    MainClass mc = new MainClass();
    return mc.subby();
  }

}
import pkg.*;

public class Main {
  public static void main(String[] args) {
    ThirdClass tc = new ThirdClass();
    MainClass.SubClass sc = tc.getIt();
    sc.someSubFunction();
  }
}

Compiling all and decompiling Main.class with JD-GUI gives out:

import pkg.MainClass.SubClass;
import pkg.ThirdClass;

public class Main
{
  public Main() {}

  public static void main(String[] paramArrayOfString)
  {
    ThirdClass localThirdClass = new ThirdClass();
    MainClass.SubClass localSubClass = localThirdClass.getIt();
    localSubClass.someSubFunction();
  }
}

But that is wrong. It should be

import pkg.MainClass;

instead of

import pkg.MainClass.SubClass;

New version 1.0 does not work

Opening a java class file for decompiling results in the following exception:

c:\>java -jar jd-gui-1.0.0-RC1.jar
Exception in thread "AWT-EventQueue-0" groovy.lang.MissingMethodException: No si
gnature of method: java.lang.String.indexOf() is applicable for argument types:
(java.lang.Character) values: [\]
Possible solutions: indexOf(int), indexOf(java.lang.String), indexOf(int, int),
indexOf(java.lang.String, int), intern(), next()
        at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptByteco
deAdapter.java:56)
        at org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaC
lassSite.java:46)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSi
teArray.java:45)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCa
llSite.java:108)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCa
llSite.java:120)
        at jd.gui.service.fileloader.ClassFileLoaderProvider$_load_closure1.doCa
ll(ClassFileLoaderProvider.groovy:32)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:
90)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(C
losureMetaClass.java:292)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1017)
        at groovy.lang.Closure.call(Closure.java:423)
        at groovy.lang.Closure.call(Closure.java:439)
        at org.codehaus.groovy.runtime.IOGroovyMethods.withStream(IOGroovyMethod
s.java:1203)
        at org.codehaus.groovy.runtime.ResourceGroovyMethods.withInputStream(Res
ourceGroovyMethods.java:1642)
        at org.codehaus.groovy.runtime.dgm$996.invoke(Unknown Source)
        at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMetho
dSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:271)
        at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMeta
MethodSite.java:53)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSi
teArray.java:45)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCa
llSite.java:108)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCa
llSite.java:120)
        at jd.gui.service.fileloader.ClassFileLoaderProvider.load(ClassFileLoade
rProvider.groovy:24)
        at jd.gui.spi.FileLoader$load$0.call(Unknown Source)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSi
teArray.java:45)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCa
llSite.java:108)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCa
llSite.java:128)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callSafe(Abstra
ctCallSite.java:89)
        at jd.gui.service.uriloader.FileUriLoaderProvider.load(FileUriLoaderProv
ider.groovy:19)
        at jd.gui.spi.UriLoader$load$0.call(Unknown Source)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSi
teArray.java:45)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCa
llSite.java:108)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCa
llSite.java:128)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callSafe(Abstra
ctCallSite.java:89)
        at jd.gui.controller.MainController.openURI(MainController.groovy:429)
        at jd.gui.api.API$openURI$0.callCurrent(Unknown Source)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent
(CallSiteArray.java:49)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(Abs
tractCallSite.java:149)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(Abs
tractCallSite.java:161)
        at jd.gui.controller.MainController.openFiles(MainController.groovy:356)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:
90)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(C
losureMetaClass.java:382)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1017)
        at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(Po
goMetaClassSite.java:66)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent
(CallSiteArray.java:49)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(Abs
tractCallSite.java:149)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(Abs
tractCallSite.java:161)
        at jd.gui.controller.MainController$_onOpen_closure6$_closure41.doCall(M
ainController.groovy:178)
        at jd.gui.controller.MainController$_onOpen_closure6$_closure41.doCall(M
ainController.groovy)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:
90)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(C
losureMetaClass.java:292)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1017)
        at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaC
lassSite.java:39)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSi
teArray.java:45)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCa
llSite.java:108)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCa
llSite.java:112)
        at jd.gui.view.MainView$4.show(MainView.groovy:214)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:
90)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(C
losureMetaClass.java:382)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1017)
        at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(Po
goMetaClassSite.java:66)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent
(CallSiteArray.java:49)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(Abs
tractCallSite.java:149)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(Abs
tractCallSite.java:161)
        at jd.gui.controller.MainController$_onOpen_closure6.doCall(MainControll
er.groovy:178)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:
90)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(C
losureMetaClass.java:292)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1017)
        at groovy.lang.Closure.call(Closure.java:423)
        at groovy.lang.Closure.call(Closure.java:439)
        at org.codehaus.groovy.runtime.DefaultGroovyMethods.with(DefaultGroovyMe
thods.java:238)
        at org.codehaus.groovy.runtime.dgm$735.invoke(Unknown Source)
        at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoMetaMetho
dSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:248)
        at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.call(PogoMeta
MethodSite.java:68)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSi
teArray.java:45)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCa
llSite.java:108)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCa
llSite.java:120)
        at jd.gui.controller.MainController.onOpen(MainController.groovy:175)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:
90)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(C
losureMetaClass.java:382)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1017)
        at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(Po
goMetaClassSite.java:66)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent
(CallSiteArray.java:49)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(Abs
tractCallSite.java:149)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(Abs
tractCallSite.java:153)
        at jd.gui.controller.MainController$_show_closure5$_closure22.doCall(Mai
nController.groovy:116)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:
90)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(C
losureMetaClass.java:292)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1017)
        at groovy.lang.Closure.call(Closure.java:423)
        at groovy.lang.Closure.call(Closure.java:439)
        at groovy.swing.impl.DefaultAction.actionPerformed(DefaultAction.java:38
)
        at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
        at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
        at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
        at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
        at javax.swing.AbstractButton.doClick(Unknown Source)
        at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
        at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown
Source)
        at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
        at java.awt.Component.processMouseEvent(Unknown Source)
        at javax.swing.JComponent.processMouseEvent(Unknown Source)
        at java.awt.Component.processEvent(Unknown Source)
        at java.awt.Container.processEvent(Unknown Source)
        at java.awt.Component.dispatchEventImpl(Unknown Source)
        at java.awt.Container.dispatchEventImpl(Unknown Source)
        at java.awt.Component.dispatchEvent(Unknown Source)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
        at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
        at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
        at java.awt.Container.dispatchEventImpl(Unknown Source)
        at java.awt.Window.dispatchEventImpl(Unknown Source)
        at java.awt.Component.dispatchEvent(Unknown Source)
        at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
        at java.awt.EventQueue.access$200(Unknown Source)
        at java.awt.EventQueue$3.run(Unknown Source)
        at java.awt.EventQueue$3.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Sour
ce)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Sour
ce)
        at java.awt.EventQueue$4.run(Unknown Source)
        at java.awt.EventQueue$4.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Sour
ce)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)

Version of Java:

c:\>java -version
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)

feature request, Provide means to copy path or package names to clipboard

When using the Java Decompiler, you'll probably often analyze some behaviour and would often need to note down critical findings. Currently, I cannot find any feature which would help me to copy some kind of location and so I always end up typing very long package names or paths from files deep inside large project directories.

After using Eclipse for a long time, I got heavily used to using certain context menu options to copy either file names, full paths or package names to the clipboard. Eclipse offers the option to "Copy Qualified Name" in the context menu when right-clicking on certain types of items in the Package Explorer.

As JD-Gui's overall look&feel is already quite similar to Eclipse's Package Explorer and Editor windows, I would propose the following strings to copy when triggering the "Copy Qualified Name" function on various object types (quite analogous to Eclipse):
jd

(1) Package name: org.acme.demo
(2) Class file path: (relative or absolute) org/acme/demo/Misc.java or D:\work\workspace\Demo\src\org\acme\demo\Misc.java
(3) Fully qualified class name: org.acme.demo.Misc
(4) Fully qualified method signature: org.acme.demo.Misc.doStuff()
(5) [potentially also class file path like (2)]

Also, it would be useful to enable the top tabs for a copy context menu like this in order to get the absolute path to the containing folder...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.