Win a copy of Building Blockchain Apps this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Liutauras Vilda
  • Knute Snortum
  • Bear Bibeault
Sheriffs:
  • Devaka Cooray
  • Jeanne Boyarsky
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • salvin francis
Bartenders:
  • Tim Holloway
  • Piet Souris
  • Frits Walraven

Tip: Decompile Class With A Right Click

 
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 ]
 
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)
 
Bartender
Posts: 1638
IntelliJ IDE MySQL Database Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I use cavaj
You can just double-click on the class file!!!
 
Rancher
Posts: 3656
34
  • 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.

 
They worship nothing. They say it's because nothing lasts forever. Like this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!