7

On my pc I cannot get jd-eclipse working , when I click on a class file I just get the standard class file editor saying source not found - I have checked the eclipse error logs and there is nothing!.

My environment is Win7 64 bits, jdk-1.7.0, Eclipse 3.7 (Indigo), JD_Eclipse(0.1.3) , its a real shame as I have used jd-eclipse before on another pc and it workedany ideas anyone ?

Ian James Fessey
  • 71
  • 1
  • 1
  • 3
  • Have a look at the accepted answer of http://stackoverflow.com/questions/4512066/how-to-get-java-decompiler-jd-jd-eclipse-running-in-eclipse-helios. Mostly I make the mistake to open classes in an eclipse project that are not yet properly added to the classpath of the project. – leo Mar 27 '13 at 00:14

2 Answers2

18

After having installed the JD-Eclipse plugin, a new entry appears in Preferences->General->Editors->File Associations when you select *.class

Make sure Class File Editor is marked as default

  • Worked for me under Ubuntu, eclipse 3.7.1. – user17481 Nov 23 '11 at 11:10
  • JD-Eclipse 0.1.3 worked for me under Eclipse 3.7 Indigo running on Windows 7 64 bits (the same of OP's conditions). – falsarella Apr 25 '12 at 11:59
  • I meant that _this solution_ worked for me! :) Thanks, Thierry Hermann. – falsarella Apr 25 '12 at 12:35
  • 7
    Do the same for "*.class without source" – Carlos Tasada Aug 21 '12 at 14:36
  • after doing this, those jars with source code attached are also de-compiled rather than using the source code; this is unwanted... I tried to make class file viewer as default and then with class file editor, but it will not de-compile.... i'm using win 7 32 bit, eclipse 3.7 sr2 and jd elipse 0.1.3 – hetaoblog Dec 12 '12 at 05:28
  • I have 2 editors listed: Class File Viewer [Decompiled] & Class File Viewer. Anyone know the difference? – Snekse Jan 08 '13 at 16:06
6

To get this working in Eclipse Juno, I had to go to Preferences->General->Editors->File Associations and under "*.class without source" I had to go to "Add..." and select Class File Editor.

  • thanks!! also, you need to mark the Class File Editor as default or else it won't work (at least for me!) – Neets Oct 05 '12 at 10:40