WingDis is a command-line utility which allows users to convert a Java class file or zip file (compressed class files) to Java-like source code. The eventual goal of WingDis is to generate compilable and equivalent source code as the original one. WingDis may be used in analyzing unknown Java class files or public interfaces such as JDK, or help recover Java source code after source files are accidently removed.
WingDis is implemented in Java, so it can runs on any platforms.
1. make a directory named Wingdis204(or any other name)
2. download the zip file into the directory
3. unzip the zip file
4. put the directory on your classpath.
Now, you are ready to use the WingDis.
java javadis.Decompiler [options] files or classes list
If no options are given, only high level interfaces will be genereated and the
output will be sent to the standard output.
-c Generate code for methods. -l Generate line number information in the output. This option is effective only if -c option is also used. -n Turn off control flow analysis. This option is only effective when -c option is also used. -d Generate private fields and methods -s Save the output to separate files. Each class will have a separate file. The file name will be the class name plus extension (.javadis or specified by users with option -e). The default is to send the output to the standard output. -t Use the fully-qualified Java class name as the file name. No subdirectories will be generated. This option is only valid when -s is also used. -dir path Specify a directory where the output will be saved. WingDis will create subdirectories for packages when needed. The default directory is the current directory. This option will be effective only if -s is also used. -e .ext Specify extension of the output file. The defualt extension is .javadis. This option will be effective only if -s is also used. -o Overwrite the output files that already exist. The default is to ask users to confirm on whether existing files should be overwritten. This option will be effective only if -s is also used. -v Verbose mode, for printing some detailed information during processing. The default is off.
Files names should be ended with either ".class" or ".zip", and classes names should not be ended with ".class" or ".zip". When files names are specified, the specified path will be searched for the files. When classes are specified, the CLASSPATH will be searched.
Example 1: java javadis.Decompiler -c user.class
This requires that the file user.class be located in the current directory.
Example 2: java javadis.Decompiler -c user
This example requires that a class file named user.class is at somewhere on the CLASSPATH.
The options and files order are flexible, i.e.,
java javadis.Decompiler -c user and java javadis.Decompiler user -c
are the same.
File names can contain alias characters '*', '?', '[', ']' which are used to specifiy a group of files. As used in a regular expression, '*' means any characters including none, and '?' represents any single character, '[' and ']' are for any one character in a group.
Any problems or suggestions, please send to
support@wingsoft.com
Java is a registered trademark of Sun Microsystems, Inc.