new entry

This commit is contained in:
gferg 2000-07-13 16:59:04 +00:00
parent 50f7f92699
commit 719151ac08
1 changed files with 312 additions and 0 deletions

View File

@ -0,0 +1,312 @@
<!doctype linuxdoc system>
<!--
************************** begin comment *****************************
The following is the HOW-TO for setting up Java Decompiler.
This document is in the SGML format. You must use sgml package to
process this document
************************* end of comment *****************************
-->
<!--
************************** SGML USER GUIDE *****************************
The SGML user guide on linux is located at /usr/doc/sgml-tools
Read the example.sgml and guide.html documents.
Usage:
HTML sgml2html foo (Do not give extension .sgml here!!)
Text sgml2txt foo.sgml
Latex sgml2latex foo.sgml
Note: Use 2 dashes - before language, error while compiling
Postscript sgml2latex -language=english -o ps foo.sgml
DVI sgml2latex -d foo.sgml
Lyx sgml2lyx foo.sgml
Richtext sgml2rtf foo.sgml
gnuinfo sgml2info foo.sgml
man sgml2txt -man foo.sgml
SGML sgmlcheck foo.sgml
************************* end of comment *****************************
-->
<article>
<!-- Title information -->
<title> Java Decompiler HOW-TO
<!-- chapt change
Java Decompiler HOW-TO
-->
<author>Al Dev (Alavoor Vasudevan)
<htmlurl url="mailto:alavoor@yahoo.com"
name="alavoor@yahoo.com">
<date>v1.0, 12 July 2000
<abstract>
This document will help you to de-compile the Java class programs. This
documents gives a list of decompilers which can reverse
engineer the Java class files and generate the Java source code files.
Thie is very helpful if you do not have the Java source code file and have only
the Java class files. The information in this document applies to all
the operating sytems where Java language/Java VM runs.
</abstract>
<!-- Table of contents -->
<toc>
<!-- Begin the document -->
<!--
*******************************************
************ End of Section ***************
*******************************************
<chapt>Introduction
-->
<sect>Introduction
<p>
Java compiler compiles the Java source code files (*.java) into
binaries files (*.class). You would use the Java de-compiler to
convert java class files into source code files (*.java).
Java de-compiler is very useful especially if you have *.class
files and you do not have access to the source code. Some vendors
do not ship the source code for java class files, in which case
you use the java decompiler to look at the source code.
See also the "javap" command from Sun Microsystems. This command is
available as soon as you install the JDK from Sun Microsystems.
At unix prompt type -
<code>
bash$ javap -help
bash$ javap -c <filename>.class
</code>
The following are the list of Java decompilers available -
<itemize>
<item> "SourceAgain" from Ahpah corp at <url url="http://www.ahpah.com">
<item> "Class Cracker" from Mayon Software, Australia at <url url="http://www.tip.net.au/~mayon/classcracker/ccorder.html"> and at <url url="http://www.pcug.org.au/~mayon">
<item> "DeCafe Pro" from DeCafe, France at <url url="http://decafe.hypermart.net/index.htm">
<item> "IceBreaker" from BreakerTech corp, U.K. at <url url="http://www.breakertech.com">
and at <url url="http://www.breakertech.com/breaker/ice/ice.html#download">
<item> "NMI Java decompiler" from NMI at
<url url="http://njcv.htmlplanet.com">
and at
<url url="http://njcv.htmlplanet.com/njcv.html">
<item> "SourceTech Java decompiler" from Source Tech corp at <url url="http://www.srctec.com">
and at <url url="http://members.tripod.com/~SourceTec/jasmine.htm">
<item> "Jad" Java Decompiler at
<url url="http://www.geocities.com/SiliconValley/Bridge/8617/jad.html#general">
and at
<url url="http://www.geocities.com/SiliconValley/Bridge/8617/jad.html#gui">
</itemize>
<!--
*******************************************
************ End of Section ***************
*******************************************
<chapt> How can I trust Java Decompiler ??!!
-->
<sect> How can I trust Java Decompiler ??!!
<p>
For 100% assurance you need a <bf>SCIENTIFIC</bf> way to
validate and trust the Java Decompiler program. The method described
in this section will enable the decompiler program to be accepted
as "trust-worthy" and reliable.
In order to verify that the decompiler program
is regenerating the Java source-code properly,
use the following technique -
Generate the class file from the generated
source code using the compiler -
<code>
bash$ mv myprogram.class myprogram_orig.class
bash$ javac myprogram.java
</code>
Now use the unix 'diff' command to compare the two class files -
<code>
bash$ diff myprogram.class myprogram_orig.class
</code>
Both these files <bf>MUST BE IDENTICAL</bf>. This verifies that
decompiler program is working perfectly. On DOS or Windows 95 you may want to use
the free <url name="Cygnus" url="http://www.cygnus.com"> Cygwin
'diff' or 'MKS' utilities.
This step gives 100% guarantee and 100% quality assurance
and life term or long term <bf>WARRANTY</bf> on decompiler programs.
It is strongly recommended that you do these steps
every time you run decompiler programs.
<!--
*******************************************
************ End of Section ***************
*******************************************
<chapt change> Related URLs
-->
<sect> Related URLs
<p>
Visit following locators which are related to Java -
<itemize>
<item> <url url="http://metalab.unc.edu/LDP/HOWTO/Vim-HOWTO.html" name="Vim color text editor for Java, C++, C">
<item> <url url="http://metalab.unc.edu/LDP/HOWTO/C-C++Beautifier-HOWTO.html" name="Beautifier HOWTO for Java and C++ programs">
<item> <url url="http://metalab.unc.edu/LDP/HOWTO/C++Programming-HOWTO.html" name="C++ Programming HOWTO has support Java like String objects">
<item> Linux goodies main site <url url="http://www.aldev.8m.com">
<item> Linux goodies mirror site <url url="http://aldev.webjump.com">
</itemize>
<!--
*******************************************
************ End of Section ***************
*******************************************
<chapt change> Other Formats of this Document
-->
<sect> Other Formats of this Document
<p>
This document is published in 11 different formats namely - DVI, Postscript,
Latex, Adobe Acrobat PDF,
LyX, GNU-info, HTML, RTF(Rich Text Format), Plain-text, Unix man pages and SGML.
<itemize>
<item>
You can get this HOWTO document as a single file tar ball in HTML, DVI,
Postscript or SGML formats from -
<url url="ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/other-formats/">
<item>Plain text format is in: <url url="ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO">
<item>Translations to other languages like French, German, Spanish,
Chinese, Japanese are in
<url url="ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO">
Any help from you to translate to other languages is welcome.
</itemize>
The document is written using a tool called "SGML-Tools" which can be got from -
<url url="http://www.sgmltools.org">
Compiling the source you will get the following commands like
<itemize>
<item>sgml2html Java-Decompiler-HOWTO.sgml (to generate html file)
<item>sgml2rtf Java-Decompiler-HOWTO.sgml (to generate RTF file)
<item>sgml2latex Java-Decompiler-HOWTO.sgml (to generate latex file)
</itemize>
LaTeX documents may be converted into PDF files simply by
producing a Postscript output using <bf>sgml2latex</bf> ( and dvips) and running the
output through the Acrobat <bf>distill</bf> (<url url="http://www.adobe.com">) command as follows:
<code>
bash$ man sgml2latex
bash$ sgml2latex filename.sgml
bash$ man dvips
bash$ dvips -o filename.ps filename.dvi
bash$ distill filename.ps
bash$ man ghostscript
bash$ man ps2pdf
bash$ ps2pdf input.ps output.pdf
bash$ acroread output.pdf &
</code>
Or you can use Ghostscript command <bf>ps2pdf</bf>.
ps2pdf is a work-alike for nearly all the functionality of
Adobe's Acrobat Distiller product: it
converts PostScript files to Portable Document Format (PDF) files.
<bf>ps2pdf</bf> is implemented as a very small command script (batch file) that invokes Ghostscript, selecting a special "output device"
called <bf>pdfwrite</bf>. In order to use ps2pdf, the pdfwrite device must be included in the makefile when Ghostscript was compiled;
see the documentation on building Ghostscript for details.
This howto document is located at -
<itemize>
<item> <url url="http://sunsite.unc.edu/LDP/HOWTO/Java-Decompiler-HOWTO.html">
</itemize>
Also you can find this document at the following mirrors sites -
<itemize>
<item> <url url="http://www.caldera.com/LDP/HOWTO/Java-Decompiler-HOWTO.html">
<item> <url url="http://www.WGS.com/LDP/HOWTO/Java-Decompiler-HOWTO.html">
<item> <url url="http://www.cc.gatech.edu/linux/LDP/HOWTO/Java-Decompiler-HOWTO.html">
<item> <url url="http://www.redhat.com/linux-info/ldp/HOWTO/Java-Decompiler-HOWTO.html">
<item> Other mirror sites near you (network-address-wise) can be found at
<url url="http://sunsite.unc.edu/LDP/hmirrors.html">
select a site and go to directory /LDP/HOWTO/Java-Decompiler-HOWTO.html
</itemize>
In order to view the document in dvi format, use the xdvi program. The xdvi
program is located in tetex-xdvi*.rpm package in Redhat Linux which can be
located through ControlPanel | Applications | Publishing | TeX menu buttons.
To read dvi document give the command -
<tscreen><verb>
xdvi -geometry 80x90 howto.dvi
man xdvi
</verb></tscreen>
And resize the window with mouse.
To navigate use Arrow keys, Page Up, Page Down keys, also
you can use 'f', 'd', 'u', 'c', 'l', 'r', 'p', 'n' letter
keys to move up, down, center, next page, previous page etc.
To turn off expert menu press 'x'.
You can read postscript file using the program 'gv' (ghostview) or
'ghostscript'.
The ghostscript program is in ghostscript*.rpm package and gv
program is in gv*.rpm package in Redhat Linux
which can be located through ControlPanel | Applications | Graphics menu
buttons. The gv program is much more user friendly than ghostscript.
Also ghostscript and gv are available on other platforms like OS/2,
Windows 95 and NT, you view this document even on those platforms.
<itemize>
<item>Get ghostscript for Windows 95, OS/2, and for all OSes from <url url="http://www.cs.wisc.edu/~ghost">
</itemize>
To read postscript document give the command -
<tscreen><verb>
gv howto.ps
ghostscript howto.ps
</verb></tscreen>
You can read HTML format document using Netscape Navigator, Microsoft Internet
explorer, Redhat Baron Web browser or any of the 10 other web browsers.
You can read the latex, LyX output using LyX a X-Windows front end to latex.
<!--
*******************************************
************ End of Section ***************
*******************************************
<chapt> Copyright
-->
<sect> Copyright
<p>
Copyright policy is GNU/GPL as per LDP (Linux Documentation project).
LDP is a GNU/GPL project.
Additional requests are - you retain the author's name, email address
and this copyright notice on all the copies. If you make any changes
or additions to this document then you should
intimate all the authors of this document.
<!--
*******************************************
************ End of Section ***************
*******************************************
-->
</article>