               JadRetro - a Java decompiler helper
               -----------------------------------
              Brief information about JadRetro v1.6
           --------------------------------------------
           (c) 2007-2008 Ivan Maidanski <ivmai@mail.ru>


Project home page
-----------------

http://jadretro.sourceforge.net


Preface
-------

  JadRetro is a command-line utility that could help You to successfully
decompile Java classes created by the modern Java compilers (of Java 1.4,
Java 1.5 or later).
  JadRetro operates by transforming the specified Java class files
(if needed) into ones which could be processed correctly by an old Java
decompiler (designed to work with classes of Java 1.3 or earlier).
  JadRetro is not a decompiler itself, it is a class transformer helping
some old (but good) Java decompilers to convert more class files and/or
generate more correct source code.

Disclaimer
----------

You use this software at your own risk.

This application is for legal use only.

All rights reserved.

Installation
------------

Download the binary distributive file appropriate to your host platform.

Extract the contents of the distributive file (preserving the directories
structure) into any appropriate place (eg., "C:\Program Files" for
Windows, "/usr/share" for Linux) on your hard drive. No other setup is
required.

To uninstall the software, just remove "jadretro" directory.

Supported platforms
-------------------

JadRetro is officially built for the following platforms:
- JavaVM (J2SE/JDK v1.3+),
- Windows x86 (Win95/98/Me/NT/2000/XP/2003/Vista/Win7),
- Linux x86.

The native binary files (for Windows and Linux) are created using the
JCGO tool and the corresponding C/C++ compiler (MinGW and GNU/Linux GCC,
respectively).

Note for the JavaVM platform: JadRetro could be compiled to and works
correctly even on an ancient JDK v1.0.2.

Usage directions
----------------

The Java classes to be processed are specified (in the command line) by
their file path names; if a directory (folder) path name is specified
instead then all the classes contained in it (or in its sub-directories
recursively) are processed; the wildcards are allowed for path names.

The allowed command-line options are:
-b - Keep all (do not process) Java bridge methods (otherwise some of
Java 1.5 bridge methods may be removed if redundant);
-l - Do not adjust local class names (i.e., do not map names of
method-local classes to that matching the style of Java 1.3);
-c - Change class version to Java 1.3 if greater (otherwise major and
minor "version" fields of class files are not changed);
-d <directory> - Specify output base (root) folder for the modified class
files (unchanged files are not copied to it, if this option is not
specified then original class files are overwritten if modified by
JadRetro).

Tested with
-----------

JadRetro is tested with class files created by Sun "javac" (v1.3.1,
v1.4.1, v1.4.2, v1.5.0, v1.6.0).

JadRetro is tested only with the well-known "Jad" tool (the fast Java
Decompiler) v1.5.8g.

Notes
-----

Tips for use with "Jad" tool:
1. JadRetro "-b", "-c" and "-l" options are not required (normally);
2. Jad "-safe" option should not be used (at least for v1.5.8g - Jad
produces incorrect source for some code constructions with it).

Sample usage (for Windows):

copy /b someLocation\somePackage\SomeClass*.class tempLocation
jadretro tempLocation\SomeClass*.class
jad tempLocation\SomeClass.class

Application limitations
-----------------------

While JadRetro improves the "quality" of the source code produced by
a Java decompiler, it does not help in all cases (i.e., not all classes
could be decompiled and not all decompiled classes could be compiled back
without modifications).

Exit codes
----------

The application terminates execution with one of the error codes:
0 - no error (all done),
1 - cannot list directory,
2 - file not found,
3 - file read error,
4 - unexpected end of file,
5 - invalid class file,
6 - cannot open file for writing,
7 - file write error.

License
-------

This is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.

This software is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License (GPL) for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.

As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version.

User's feedback
---------------

Any questions, suggestions, bug reports and patches are welcomed at
the JadRetro site tracker (hosted at SourceForge.net).

                          --- [ End of File ] ---
