Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tip: Decompile Class With A Right Click

 
Patrick Kent
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This took me a bit of experimentation to figure out, so I thought I'd save y'all the time by posting it. This tip shows you how to put a decompiler in your Windows Send To menu. Once that is done you can just right click on any class, select Send To, and select Decompile.

Let's forego the controversy about decompiling. Let's say you have a legitimate reason, are not stealing code, and have permission to decompile whatever it is.

First, you'll need JAD (http://www.kpdus.com/jad.html).

Install it where ever you want. I have mine in c:\java\.

Go to your Send To folder in your windows profile. Create a new file there called "Decompile.bat".

Edit the file and paste this in:



You're done, enjoy.

[ August 06, 2008: Message edited by: Patrick Kent ]
[ August 06, 2008: Message edited by: Patrick Kent ]
 
Sumit Bisht
Ranch Hand
Posts: 331
Python Ruby Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Patrick!
The JAD decompiler also comes bundled(?) with Gel-a light window executable based ide.

I am not so sure whether this works correctly as sometimes I've ended up with methods without any code in between .
(I did this to see a business method implementation in a Session Bean,after it was unjarred)
 
Nitesh Kant
Bartender
Posts: 1638
IntelliJ IDE Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I use cavaj
You can just double-click on the class file!!!
 
Norm Radder
Ranch Hand
Posts: 733
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In windows double click means to open a file with a default commandline. That information is stored in the registry.
Does the install of Cavaj change your registry to make it the default for .class files? What if you already have a default and don't want to change it?
Will it destroy your existing registry entries for .class files?
Does it ask you permission to change your registry?
I'd be careful installing a program that makes changes to your registry.

I have several context menu choices for .class files that appear when I RC on a class file.
 
Patrick Kent
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I too enjoy having several contextual options for a given file type.

Here's another batch script for your Send To menu. This one decompiles a whole jar file.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic