Java decompiler plugin not working
Asked Answered
X

4

23

I have the JD-eclipse-plugin installed. I want to decompile the classes within a jar-file. So I select the jar-file within Project-Explorer and click Decompiler in the Menu. However both decompilers (JAD and JD-core) are greyed out.

I also tried the steps shown in this blog on AVAJAVA Web Tutorials. I guess the blog is a bit outdated, however I can see within Windows-->Preferences-->Java-->Decompiler that Jad is correctly set up. But there is no JD-eclipse found within Preferences-->General-->Editors-->File Associations as you can see in the following image.jd-eclipse-plugin. Now I right click the jar-file within Project-Explorer, but there is no such "Attach Source File".

Did I miss anything to set up the plugin?

EDIT: I´m using the following setup: Eclipse: Mars.1 Release (4.5.1); JadClipse 4.0.0; JDK 1.8

EDIT2: Forgot to mention that I use Tomcat and want to dive into the libraries from /WebContent/WEB-INF/lib. This is not working, I cannot further collapse the jar-files.

Xenia answered 17/11, 2015 at 9:10 Comment(5)
Have you followed the installation as described here jd.benow.ca/#jd-eclipse-downloadAssassinate
also remember: most decompilers aren't really up-to-date. as far as they're concerned, Lambda's, default methods, ... don't exist, so they might not be able to work with your installed version of JavaBogosian
@Assassinate Well, I got it from eclipse marketplace (JadEclipse).Xenia
@HimBromBeere Could you please add the version numbers of Eclipse, the plugin and your used JDK.Assassinate
@Assassinate Eclipse: Mars.1 Release (4.5.1); JadEclipse 4.0.0; JDK 1.8. However compliance for J2SE-1.4 is set within Project-->Properties-->Java CompilerXenia
X
5

Obviously I mixed the actual JD-eclipse-plugin an a plugin called JadClipse for Eclipse which is a slightly different plugin from eclipse marketplace. Thus when I followed the installation instructions of JD-eclipse, I could set the options for the screenshot posted within the question. So I set JD-eclipse as default for both *.class-files with and those without source-code.

Second mistake I did was a pretty silly and obvious one, namely that I wanted to browse the jar-files from within WEB-INF-folder of my Tomcat instead of from within Java Resources. Thus I could not dive into the jar-files at all hindering me to get to the class-level and thus to decompile those classes contained within the jar.

I hope this helps anyone outside also having trouble with the plugin for eclipse.

Xenia answered 17/11, 2015 at 10:6 Comment(0)
T
82

For Eclipse 2018-09 , the problem was related to " class without source "

  • I had resolved this issue by going to:

    1. Preferences
    2. General
    3. Editors
    4. File Associations
    5. Class without source

and setting decompliler viewer as default : see the following screen shot:

enter image description here

Terri answered 15/10, 2018 at 7:47 Comment(2)
This is wild to me. I wonder why it sets itself as the default for .class but not .class without source? To me, I think more people would care about the second.Whaling
Seems to be a known issue: github.com/ecd-plugin/ecd/issues/43Whaling
X
5

Obviously I mixed the actual JD-eclipse-plugin an a plugin called JadClipse for Eclipse which is a slightly different plugin from eclipse marketplace. Thus when I followed the installation instructions of JD-eclipse, I could set the options for the screenshot posted within the question. So I set JD-eclipse as default for both *.class-files with and those without source-code.

Second mistake I did was a pretty silly and obvious one, namely that I wanted to browse the jar-files from within WEB-INF-folder of my Tomcat instead of from within Java Resources. Thus I could not dive into the jar-files at all hindering me to get to the class-level and thus to decompile those classes contained within the jar.

I hope this helps anyone outside also having trouble with the plugin for eclipse.

Xenia answered 17/11, 2015 at 10:6 Comment(0)
B
0

I had the same problem but "class without source" did have decompliler viewer as default. So all I did was set class file viewer as default and then switched back and that fixed the issue.

Banquer answered 20/11, 2018 at 12:42 Comment(0)
D
0

I had to update all of my plugins. the Procyon decompiler has this symptom when running under java 11 or later.

Devotional answered 2/9, 2022 at 18:16 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.