Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Jad(I can't decompile with Jad)
Jad [message #735749] Wed, 12 October 2011 16:08 Go to next message
Adrián Córdoba is currently offline Adrián CórdobaFriend
Messages: 17
Registered: January 2011
Junior Member
I just installed "JDT Decompiler Feature" (Jad) 3.4 on Eclipse Indigo in order to decompile .class files, but when I try to decompile a file, the "Class File Editor" is opened instead of "Decompiled Class File Viewer".
I had configuerd the "Pad to decompiler" in Preferences/Java/Decompilers/Jad, and "Decompiled Class File Viewer" as default in Preferences/General/Editors/File Associations for "*.class" files.

The only thing I found odd is that "Class File Viewer" is marked with "(locked by 'Java Class File' content type)" in File Associations for *.class files, also. And I can't change it.

Note: I can decompile a .class file by invoking jad in a command line console.

Thank you in advance.

--
[Adrián E. Córdoba]

[Updated on: Wed, 12 October 2011 16:15]

Report message to a moderator

Re: Jad [message #735803 is a reply to message #735749] Wed, 12 October 2011 18:45 Go to previous messageGo to next message
David M. Karr is currently offline David M. KarrFriend
Messages: 624
Registered: July 2009
Senior Member
I find that JD-Eclipse (http://java.decompiler.free.fr/?q=jdeclipse) is a better choice for decompiling. The old JAD decompiler apparently doesn't understand features that are new in Java 5, but JD-Eclipse does. I've never had a problem like what you describe with JD-Eclipse.
Re: Jad [message #735812 is a reply to message #735803] Wed, 12 October 2011 19:34 Go to previous messageGo to next message
Adrián Córdoba is currently offline Adrián CórdobaFriend
Messages: 17
Registered: January 2011
Junior Member
I just installed JD-Eclipse and it happens the same thing: when I try to open a .class file, Class File Editor is opened as I show you in attached file (ClassFileEditor.jpg).

What strikes me is the reading "(locked by 'Java Class File' content type)" in Preferences like in the imsge I attached (Preferences.jpg), and I can't change it.

Thank you, very much.

--
[Adrián E. Córdoba]
Re: Jad [message #735822 is a reply to message #735812] Wed, 12 October 2011 19:49 Go to previous messageGo to next message
David M. Karr is currently offline David M. KarrFriend
Messages: 624
Registered: July 2009
Senior Member
The file associations look ok. It's obviously using the correct editor, because the cup icon is showing.

Did you install the plugin through the update manager and properly restart Eclipse?
Re: Jad [message #735826 is a reply to message #735822] Wed, 12 October 2011 20:13 Go to previous messageGo to next message
Adrián Córdoba is currently offline Adrián CórdobaFriend
Messages: 17
Registered: January 2011
Junior Member
David M. Karr wrote on Wed, 12 October 2011 16:49
The file associations look ok. It's obviously using the correct editor, because the cup icon is showing.

Did you install the plugin through the update manager and properly restart Eclipse?


Yes, I installed JD-Eclipse by mean "Install New Software..." and then I restarted Eclipse.
Besides, I repeated the procedure once again. The only difference is I'm using Eclipse 3.7 (Indigo).

The same thing happens with Windows XP and openSuse 11.4 (Linux) operating systems.

Thank you very much.

[Adrián E. Córdoba]
Re: Jad [message #735832 is a reply to message #735826] Wed, 12 October 2011 20:27 Go to previous messageGo to next message
David M. Karr is currently offline David M. KarrFriend
Messages: 624
Registered: July 2009
Senior Member
Just as an attempt to make your configuration look more similar to what I know works, even if it's irrelevant, could you please package up your classes into a standard jar file and then add that jar file to your project classpath, and then try to view that class?
Re: Jad [message #735837 is a reply to message #735832] Wed, 12 October 2011 20:41 Go to previous messageGo to next message
Adrián Córdoba is currently offline Adrián CórdobaFriend
Messages: 17
Registered: January 2011
Junior Member
David M. Karr wrote on Wed, 12 October 2011 17:27
Just as an attempt to make your configuration look more similar to what I know works, even if it's irrelevant, could you please package up your classes into a standard jar file and then add that jar file to your project classpath, and then try to view that class?

If I try to open a .jar file with the Class File Editor, I get:
Could not open the editor: The Class File Viewer cannot handle the given input ('org.eclipse.ui.part.FileEditorInput').


Thank you.
Re: Jad [message #735852 is a reply to message #735837] Wed, 12 October 2011 21:39 Go to previous messageGo to next message
David M. Karr is currently offline David M. KarrFriend
Messages: 624
Registered: July 2009
Senior Member
Well, of course. It's a jar file, not a class file. I didn't ask you to open the jar file as a class file, I asked you to create a jar file containing those classes and put that jar file in your project classpath.
Re: Jad [message #735878 is a reply to message #735852] Thu, 13 October 2011 00:43 Go to previous messageGo to next message
Adrián Córdoba is currently offline Adrián CórdobaFriend
Messages: 17
Registered: January 2011
Junior Member
David M. Karr wrote on Wed, 12 October 2011 18:39
Well, of course. It's a jar file, not a class file. I didn't ask you to open the jar file as a class file, I asked you to create a jar file containing those classes and put that jar file in your project classpath.


I beg your pardon.
I put the jar file in the classpath, but the same thing happens.
Thank you, again.

[Adrián E. Córdoba]
Re: Jad [message #735888 is a reply to message #735749] Thu, 13 October 2011 01:04 Go to previous messageGo to next message
Deepak Azad is currently offline Deepak AzadFriend
Messages: 543
Registered: July 2009
Senior Member
On 10/12/2011 9:38 PM, Adri wrote:
> I just installed "JDT Decompiler Feature" (Jad) 3.4 on Eclipse Indigo in
> order to decompile .class files, but when I try to decompile a file, the
> "Class File Editor" is opened instead of "Decompiled Class File Viewer".
> I had configuerd the "Pad to decompiler" in
> Preferences/Java/Decompilers/Jad, and "Decompiled Class File Viewer" as
> default in Preferences/General/Editors/File Associations for "*.class"
> files.
>
> The only thing I found odd is that "Class File Viewer" is marked with
> "(locked by 'Java Class File' content type)" in File Associations for
> *.class files, also. And I can't change it.
>
> Note: I can decompile a .class file by invoking jad in a command line
> console.
>
> Thank you in advance.

I think you are looking for
https://bugs.eclipse.org/bugs/show_bug.cgi?id=360642, which got fixed
yesterday :)
Re: Jad [message #736052 is a reply to message #735888] Thu, 13 October 2011 13:09 Go to previous messageGo to next message
Adrián Córdoba is currently offline Adrián CórdobaFriend
Messages: 17
Registered: January 2011
Junior Member
Deepak Azad wrote on Wed, 12 October 2011 22:04
On 10/12/2011 9:38 PM, Adri wrote:
> I just installed "JDT Decompiler Feature" (Jad) 3.4 on Eclipse Indigo in
> order to decompile .class files, but when I try to decompile a file, the
> "Class File Editor" is opened instead of "Decompiled Class File Viewer".
> I had configuerd the "Pad to decompiler" in
> Preferences/Java/Decompilers/Jad, and "Decompiled Class File Viewer" as
> default in Preferences/General/Editors/File Associations for "*.class"
> files.
>
> The only thing I found odd is that "Class File Viewer" is marked with
> "(locked by 'Java Class File' content type)" in File Associations for
> *.class files, also. And I can't change it.
>
> Note: I can decompile a .class file by invoking jad in a command line
> console.
>
> Thank you in advance.

I think you are looking for
https://bugs.eclipse.org/bugs/show_bug.cgi?id=360642, which got fixed
yesterday Smile


Thank you, Deepak Azad.
Do you mean with "Bug fixed yesterday": the resolution will be available on near future (Eclipse 3.8 M3)?

Thank you for your work!

[Adrián E. Córdoba]
Re: Jad [message #736064 is a reply to message #736052] Thu, 13 October 2011 13:32 Go to previous messageGo to next message
Deepak Azad is currently offline Deepak AzadFriend
Messages: 543
Registered: July 2009
Senior Member
On 10/13/2011 6:39 PM, Adri wrote:
> Do you mean with "Bug fixed yesterday": the resolution will be available
> on near future (Eclipse 3.8 M3)?
Yup. The fix is already in the 3.8 nightly builds
(http://download.eclipse.org/eclipse/downloads/eclipse3x.php), you can
give it a try and see if it works for you.
Re: Jad [message #736162 is a reply to message #736064] Thu, 13 October 2011 17:53 Go to previous messageGo to next message
Adrián Córdoba is currently offline Adrián CórdobaFriend
Messages: 17
Registered: January 2011
Junior Member
Deepak Azad wrote on Thu, 13 October 2011 10:32
On 10/13/2011 6:39 PM, Adri wrote:
> Do you mean with "Bug fixed yesterday": the resolution will be available
> on near future (Eclipse 3.8 M3)?
Yup. The fix is already in the 3.8 nightly builds
(http://download.eclipse.org/eclipse/downloads/eclipse3x.php), you can
give it a try and see if it works for you.


I installed it and tried the bug fix. Also, I associated "*.class without source" with "Decompiled Class File Viewer" as default. But it happens the same thing.

[Adrián E. Córdoba]

Re: Jad [message #736186 is a reply to message #736162] Thu, 13 October 2011 18:39 Go to previous messageGo to next message
Deepak Azad is currently offline Deepak AzadFriend
Messages: 543
Registered: July 2009
Senior Member
On 10/13/2011 11:23 PM, Adri wrote:
> I installed it and tried the bug fix. Also, I associated "*.class
> without source" with "Decompiled Class File Viewer" as default. But it
> happens the same thing.

Strange! Could you please add a comment to the bug and mention the build
id you used, the decompiler you used and the exact steps followed.
Re: Jad [message #736209 is a reply to message #736186] Thu, 13 October 2011 20:06 Go to previous messageGo to next message
Adrián Córdoba is currently offline Adrián CórdobaFriend
Messages: 17
Registered: January 2011
Junior Member
Deepak Azad wrote on Thu, 13 October 2011 15:39
On 10/13/2011 11:23 PM, Adri wrote:
> I installed it and tried the bug fix. Also, I associated "*.class
> without source" with "Decompiled Class File Viewer" as default. But it
> happens the same thing.

Strange! Could you please add a comment to the bug and mention the build
id you used, the decompiler you used and the exact steps followed.


Ready!
I added a comment to the bug.
Thank you again.

[]Adrián E. Córdoba]
Re: Jad [message #736621 is a reply to message #736162] Fri, 14 October 2011 06:54 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
On 13.10.2011 19:53, Adri wrote:
> Deepak Azad wrote on Thu, 13 October 2011 10:32
>> On 10/13/2011 6:39 PM, Adri wrote:
>> > Do you mean with "Bug fixed yesterday": the resolution will be
>> available
>> > on near future (Eclipse 3.8 M3)?
>> Yup. The fix is already in the 3.8 nightly builds
>> (http://download.eclipse.org/eclipse/downloads/eclipse3x.php), you
>> can give it a try and see if it works for you.
>
>
> I installed it and tried the bug fix. Also, I associated "*.class
> without source" with "Decompiled Class File Viewer" as default. But it
> happens the same thing.
I don't know the "Decompiled Class File Viewer" but this probably won't
work. You need to hook a decompiler editor to the new file type, e.g.
the DJ Java Decompiler (DJ.exe).

Dani
>
> [Adrián E. Córdoba]
>
>
Re: Jad [message #740486 is a reply to message #736621] Tue, 18 October 2011 15:06 Go to previous messageGo to next message
Adrián Córdoba is currently offline Adrián CórdobaFriend
Messages: 17
Registered: January 2011
Junior Member
Dani Megert wrote on Fri, 14 October 2011 03:54
On 13.10.2011 19:53, I don't know the "Decompiled Class File Viewer" but this probably won't
work. You need to hook a decompiler editor to the new file type, e.g.
the DJ Java Decompiler (DJ.exe).

Dani

Sorry for the delay.
I made that you suggest, with the same result.
Thank you.

[Adrián E. Córdoba]

Re: Jad [message #1768705 is a reply to message #735832] Fri, 21 July 2017 18:55 Go to previous message
Megha Shah is currently offline Megha ShahFriend
Messages: 1
Registered: July 2017
Junior Member
This option worked for me
Thanks a lot!
Previous Topic:Maven build war file doesn't contain xhtml files
Next Topic:Launching Java IDE Oxygen
Goto Forum:
  


Current Time: Sun Feb 23 02:32:52 GMT 2020

Powered by FUDForum. Page generated in 0.03796 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top