Jad-the latest version

Source: Internet
Author: User
Tags java decompiler

From: http://www.kpdus.com/jad.html
Jad-the fast Java decompiler
  • What's new
  • Jad Main Features
  • Known bugs and limitations
  • Download Jad
  • Installation
  • Graphical UIS and utilities for Jad
  • FAQ
  • E-mail for contacts
  • Disclause


What's new

Note: Jad is free for non-commercial cial use, but since the version 1.5.6 it's no longer free for commercial cial use. this means that Jad cannot be encoded into software products (especially decompilers) without my prior permission. if you want to use Jad (as a command-line utility or as a library) in your product (s) please contact me for conditions. at the same time, Jad can be used freely for personal needs in a previous cial or non-commercial cial environments.

Jul 02,200 6: minor Update to version 1.5.8g for Windows and Mac OS X (Intel ).
Jun 16,200 6: added version for Mac OS X 10.4.6 (Intel ).
Dec 21,200 5: changed contact email address to jad@kpdus.com.
Feb 29,200 4: Jad Home Page Moved To http://www.kpdus.com/jad.html.
Dec 14,200 3: changed contact email address to kpdus@softhome.net.
Nov 23,200 1: The Page Moved To http://kpdus.tripod.com/jad.html.
SEP 15,200 1: Updated jadalign v1.01.
Aug 05,200 1: Updated Jad 1.5.8e for Linux and Windows.
Jul 19,200 1: Updated frontend plus v1.04.
Jul 15,200 1: added Jad for HP-UX 11. X.
Jul 15,200 1: Updated frontend plus v1.03.
Jul 13,200 1: added jadalign utility by Bernard Poulin.
Jul 12,200 1: Updated frontend plus v1.02.
Jul 7, 2001: released the bug-fix version 1.5.8e for Windows.
Jun 18,200 1: Alternative download locations removed because providing them violates the Yahoo GeoCities terms of service.
May 19,200 1: released the bug-fix version 1.5.8d.
May 12,200 1: provided alternative download locations since contains people reported difficulties with downloading Jad from GeoCities (bogus authentication dialogs or "file not found" errors ).
May 06,200 1: released the bug-fix version 1.5.8c. added versions for Mac OS X, NetBSD 1.5.
APR 29,200 1: released the bug-fix version 1.5.8b.
APR 17,200 1: released the bug-fix version 1.5.8a.
APR 14,200 1: released Jad 1.5.8 (JDK 1.3-compatible) for Windows, Linux (RH 7.0) and OS/2.
Feb 20,200 1: Updated frontend plus v1.00.
Nov 14,200 0: added Jad 1.5.7g for Linux (iSCSI ).
Oct 15,200 0: released the bug-fix version 1.5.7g. added frontend plus v0.08.
July 7, 2000: Updated frontend plus v0.07.
July 6, 2000: added Jad 1.5.7f for BEOs 5.0.
July 4, 2000: added Jad 1.5.7f for FreeBSD 4.0 and OpenBSD 2.7. Updated the Linux versions of Jad.
June 29,200 0: released the bug-fix version 1.5.7f for Windows, Linux (RH 6.2), Solaris 8 (Intel), Solaris 7 (iSCSI) and OS/2.
June 23,200 0: added Jad 1.5.7e for OS/2. Added frontend plus v0.06.
June 19,200 0: released the bug-fix version 1.5.7e. added one Q &.
June 10,200 0: Updated frontend plus v0.05.
May 25,200 0: Updated frontend plus v0.04.
APR 26,200 0: Updated frontend pro v0.03.
Mar 15,200 0: Updated frontend plus v0.02.
Mar 14,200 0: added decompile. El, an add-on to jde for GNU Emacs.
Jan 18,200 0: released the bug-fix version 1.5.7d. added one Q &.
Jan 13,200 0: frontend v1.02 was replaced with frontend plus v0.01. added link to frontjad-another GUI for Jad.
Jan 10,200 0: released the bug-fix version 1.5.7c.
Dec 29,199 9: Updated version for rhapsody 5.3 (fixed the "Incorrect magic" error ).
Dec 20,199 9: added version for rhapsody 5.3 (Power Macintosh, compiled by GCC 2.7.2.1). added two Q & As to the FAQ section.
Dec 13,199 9: added a third-party GUI interface for Jad and links to other Jad-based decompilers.
Dec 04,199 9: released the bug-fix version 1.5.7a. the version for Linux compiled on Redhat 6.1.

For the list of differences from previous versions click here.

Jad Main Features

Jad is a Java decompiler, I. e. program that reads one or more Java class files and converts them into Java source files which can be compiled again.

Jad is a 100% pure C ++ program and it generally works several times faster than decompilers written in Java.
Jad doesn' t use the Java Runtime for its functioning, therefore no special setup is required (like changes to the classpath variable ).

Jad can be used:

  • For recovering lost source codes;
  • For processing the sources of Java runtime libraries;
  • As a Java disassembler;
  • As a Java source code cleaner and beautifier.

Jad expects that supplied Java class files are valid ones, I. e. They can pass the Java Virtual Machine (JVM) Verification successfully.

The Jad main features:

  • Enhanced readability of the generated source code.
  • Ability to comment Java source code with JVM bytecodes. Useful for verification and educational purposes.
  • Full support for inner and anonymous classes.
  • Fast decompilation and simple setup.
  • Automatic conversion of identifiers garbled by Java obfuscators into valid ones.
  • Free for non-commercial cial use. If you wowould like to use Jad for commercial cial purposes, please contact me for conditions.

Known bugs and limitations

  • In certain cases when decompiling classes which contain inner classes, Jad cannot reliably sort out the extra arguments added to class constructors by Java compiler. in those cases Jad can generate constructors with an incorrect number of arguments or can fail to declare some local variables as final.

  • Zip and jar files are not supported. However you can unzip those files and decompile the whole class tree. Use the instructions from readme.txt.
  • In those rare cases when Jad is unable to fully decompile constructs like getting blocks with breaks or nested loops with inter-loop break/continue statements it generates the source with labels and goto statements which reflects Program's control flow and displays the message "couldn't fully decompile method <Name> ". also when Jad couldn't reconstruct all try-catch-finally statements it displays the message "couldn't resolve all exception handlers in method <Name> ".
  • Currently Jad ignores the contents of the line number table attribute and the source file attribute.
  • Currently Jad makes no use of the Java class hierarchy information. Consequently, Jad always chooses java. Lang. object as a common superclass of two different classes and inserts auxiliary casts where necessary.
  • Jad doesn' t handle inlined functions well.

Download Jad

Jad has a 'beta 'status (see disclaimer). Please send bug reports with attached. class files to me.

To download Jad click on links below.
These files are zip archives, save them with the extension. Zip and verify file sizes after download.
If you get the error "file not found", refresh the page.

Jad 1.5.8g for Windows 9x/NT/2000 on Intel Platform (238600 bytes ).
Jad 1.5.8g for Mac OS X 10.4.6 on Intel Platform (170707 bytes, compiled by GCC 4.0 ).
Jad 1.5.8e for HP-UX 11.x (293214 bytes ).
Jad 1.5.8e for Linux on Intel Platform (214917 bytes ).
Jad 1.5.8e for Linux (statically linked) (389972 bytes)-Take this version if the one above crashes or displays the "Seek error" message.
Jad 1.5.8d for OS/2 (288717 bytes)-OS/2 version was cross-compiled on Windows using emx and rsxnt packages, therefore it requires emx Runtime (emx. DLL shoshould be enough ).
Jad 1.5.8c for FreeBSD 4.0 (322311 bytes)-statically linked.
Jad 1.5.8c For OpenBSD 2.7 (334499 bytes)-statically linked.
Jad 1.5.8c For NetBSD 1.5 (324440 bytes)-statically linked.
Jad 1.5.8c for Solaris 8 on Intel Platform (264751 bytes ).
Jad 1.5.8c for Mac OS X (Darwin 1.3) on powerpc platform (266264 bytes ).
Jad 1.5.7g for Linux on Sun iSCSI platform (180606 bytes). Analyze thanks to Mr. J. Harding who offered an user account on his iSCSI computer.
Jad 1.5.7g for Linux on Sun iSCSI platform (346221 bytes)-statically linked.
Jad 1.5.7f for Solaris 7 on Sun iSCSI platform (318096 bytes)-compiled on Sun 4 m (sparc10) using gcc 2.8.1, statically linked. works on Solaris 2.6 as well. descrithanks to mr. r. volpe, NY who provided an user account on his iSCSI computer.
Jad 1.5.7f for BEOs 5.0 on Intel Platform (245422 bytes)-statically linked.
Jad 1.5.7b for Mac OS X (Rhapsody 5.3) on powerpc platform (372317 bytes ).
Jad 1.5.7a for Solaris 7 on Intel Platform (252582 bytes)-try the version for Solaris 8 instead.
Jad 1.5.5.3 for AIX 4.2 on ibm rs/6000 platform (360970 bytes ).

Installation

Unzip jad.zip file into any appropriate directory on your hard drive.
This will create two files:

-An executable file named 'jad.exe '(Windows 9x/NT/2000) or 'jad' (UNIX)

-Readme file 'readme.txt ', which contains the short User's Manual

For Unix users: Make 'jad' executable:Chmod A + x Jad

No further setup is required.

Graphical UIS and utilities for Jad

Frontend plusIs a graphical decompiler for Windows 9x/NT that uses the command-line version of Jad as its decompiling engine.Frontend plusIs written and supported by Martin Cowley (reflectonus@blueyonder.co.uk ).

Click here to download the latest versionFrontend plus(V.1.04). The size of the ZIP archive is 784820 bytes.

Graphical decompilers that use Jad as their decompiling engine:

Frontend plus-http://www.reflectonus.pwp.blueyonder.co.uk/download.htm [02/29/2004: Page not found]

Nmi's Java code viewer-http://www.trinnion.com/javacodeviewer [02/29/2004: discontinued]

Decafe pro-http://decafe.hypermart.net

Mdejava-http://molesoftware.hypermart.net [02/29/2004: site not found]

Frontjad-http://www.ire.pw.edu.pl /~ Mszklan/frontjad.htm [02/29/2004: Page not found]

DJ Java decompiler-http://members.fortunecity.com/neshkov/dj.html

Java decompiler-http://www.bysoft.se/sureshot/cavaj

Javadecompiler-http://iago-soft.iespana.es/iago-soft/jdecompiler/jdecompiler.htm (in Spanish) [02/29/2004: Page not found]

Jadclipse, Jad plugin for Eclipse IDE-http://sourceforge.net/projects/jadclipse

Decompile.zip-an add-on to the Java Development Environment (jde) for GNU Emacs. it automatically decompiles a class file and offers you a buffer to view or edit it. the add-on is written and maintained by Ingo Koch (ingo.koch@ikoch.de ).

Vajdecompiler-http://www.ibldesign.com/lorin/VAJDecompiler.shtml-Jad frontend for visualage for Java

Decomp.zip-yet another lisp code for Emacs that runs Jad on the Current Buffer. contributed by R. Mecklenburg.

Jadalign v1.01 is an utility created by Bernard Poulin (bernard@acm.org) that re-alignes Java source files produced by Jad. the resulting file can then be used for source-level debugging (I. e. stepping in the Code ). the size of the archive is 20942 bytes.

Jadclassfilenode-an open tool by A. Sazonov that replaces the built-in decompiler in JBuilder.

JASM-Java disassembler module for netbeans IDE.

Javadecompiler. vim-plugin for VIM editor by David Bowers.

FAQ

Q1: Is the source code of Jad available?

A1: Currently I have no plans to release the Jad source code for any purposes including porting to other computer platforms.

Q2: What is the option-DeadFor?

A2: This option forces Jad to decompile the dead portions of bytecode. For example, non-optimizing compilation of the following code can produce the dead bytecode:

      if (false)        {           ...       } 

This option shoshould be on by default, but the incorrect dead bytecode can crash Jad.

Q3: Why does Jad fail to generateThrowsClause in the method declarations like the one in

       int divide(int a, int b) throws DivideByZero { ... }   ? 

A3: ThisThrowsClause is represented in the Java class files byExceptionsAttribute. the Java Virtual Machine itself doesn't use these attributes (well, at least, the common implementations of JVM), so they can be stripped out of the Java class files. jad has no way of restoring this information in full if it's missing from the class file.

Q4: Why does Jad generate weird-looking static fields likeClass $ Java $ Lang $ floatAnd static methodsClass $ (string)?

A4: These fields/methods are the internal representation of<Classname>. ClassExpression and automatically generated by compiler. For example,Java. Lang. thread. ClassIs translated into the following:

... ((class$java$lang$Thread == null) ?     (class$java$lang$Thread = class$("java.lang.Thread")) :      class$java$lang$Thread); ...   static Class class$(String s) {   try   {       return Class.forName(s);   }   catch(ClassNotFoundException ex)   {       throw new NoClassDefFoundError(ex.getMessage());   } }  static Class class$java$lang$Thread; 

This is fixed in 1.5.8. the explanation for the previous versions: Jad doesn't convert all that back to the original expression, but apparently the Sun JDK 1.2 compiler is able to compile "The long format" successfully. JDK 1.3 compiler doesn't accept names containing Class $, so in order to recompile the decomplied class you need to change all expressions similar to the conditional expression above<Classname>. ClassAnd remove static methods/fields whose names start with class $.

Q5: Jad refuses to decompile my class file saying "class file version mismatch". What can I do?

A5: Use-debug option. Jad then complains about the version mismatch, but attempts to decompile the file anyway. Note that this works starting from the version 1.5.6e.

Q6: Jad fails to decompile my class file, it spits out a bunch of Gotos and JVM instructions. Why is that?

A6: There cocould be several possible reasons: the class file has been obfuscated or it was produced by non-JDK Java compiler or some functions were inlined by Java compiler. generally Jad works best with class files generated by Sun Java compilers. if you encounter such a behaviour, please send me a bug reportWith attached. class files.

Q7: How to decompile jar or ZIP archive with classes?

A7: "Unjar" (jar xvf <jarfile>) or unzip (using unzip or WinZip) the archive into a directory on your hard drive. Then see the next answer.

Q8: How to decompile the whole class tree?

A8: Run

      jad -r [-d<directory_for_sources>] [<other_options>] <directory_with_classes>**/*.class 

On UNIX The last argument shocould be in single quotes. For more information please read readme.txt.

Q9: Why do I get "class <ambiguous> list not found" from the compiler?

A9: There are two List classes: Java. AWT. List and Java. util. list. If Jad generates two import directives:

import java.awt.*;  import java.util.*; 

And your class actually uses the List class, the compiler will complain. Prior version 1.5.7d use the command-line option-pi to prevent Jad from combining the import directives.

Q10: How to Make the command-line options-FF-nonlb-space-TTo be on by default?

A10: Use the environment variable jad_options to permanently override the default settings. The example for Windows:

set JAD_OPTIONS=-ff+ -nonlb+ -t+ -space+ 

Q11: How to extract Java classes from an executable file (.exe )?

A11: Use the Java-split utility written by the decafe pro team. download it from http://decafe.hypermart.net/javasplit.htm.
Or use J ++ extract from http://www.multimania.com/dolmen/productions.

Q12: What does the error message "javaclassfileparseexception: Invalid Tag value 0x0" mean exactly?

A12: It means that your file is not a valid Java class and Jad was unable to parse it successfully. either the file was broken (for example, during download) or the package this class belongs to contains a custom Java class loader that modifies (or decrypts) Java classes after reading them into the memory. in both cases Jad cannot decompile this file as it is.

E-mail for contacts

If you have any questions, bug reports or comments regardingJad, Please send e-mail to jad@kpdus.com.

Disclause

Copyright 1997-2001 Pavel Kouznetsov. All rights reserved.

This software is provided ''as is ''and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a special purpose are disclaimed. in no event shall the author or contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.

The software is not designed or intended for use in on-line control of aircraft, air traffic, aircraft navigation or aircraft communications; or in the design, construction, operation or maintenance of any nuclear facility. the author disclaims any express or implied warranty of fitness for such uses. you must represent and warrant that you will not use the software for such purposes.

This page has been visited times since December, 1997

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.