Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Decompile Java Classes With Jad

DZone's Guide to

Decompile Java Classes With Jad

·
Free Resource
// decompile java classes


#!/usr/bin/env ruby

# decompile
# Author:   Jonhnny Weslley
# Modified: Out 29, 2008


ARGV[0] ||= "classnames"  # class file names to decompile
ARGV[1] ||= "src/"        # output directory
file = File.open(ARGV[0])
file.each_line do |line|
  if !line.include?"$"
    output=ARGV[1] + line
    `jad -d #{output[0..output.rindex('/')]} -r -o -ff -nonlb -t 4 -space -noctor #{line}`
  end
end

Topics:

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}