命令:
c :program filesJavaJDK 1.7JDK1.7.0_ 67 野性之笔jad-o-8-r-DD :/output2/src-sjavad 3360
说明:
1.**表示sendinfo文件夹下的所有文件,分层结构没有限制,只扫描分层结构的数量。 *.class表示所有class后缀的文件。
sendinfo***.class
2.jad -o -8 -r -dXXXXX -sjava XXXXX
-o:复写,如果档案已经存在,则复写
-创建与-r:Java包匹配的文件夹路径
-dXXXX:反编译后保存路径。 例如D:/output/src
-sjava:反编译文件的扩展名。 希望是. java文件
-8)必须将中文编译成unicode才能避免反编译。
注意:请不要在路径中加入中文。 否则,会发生错误。 javaclassfilereadexception 3360 can ' topeninputfileon ` d 3360XXXXXX '
注意: @XmlAttribute、@Autowired等所有评论都将丢失。 表示非常不可靠
补充:
使用方法:
[1]class文件:反编译jad example.class将生成example.jad。 在文本编辑器中打开时将显示java源代码
[2]使用jad -sjava example.class指定扩展名以生成源代码,然后生成example.java
[3]要重命名生成的源代码,请使用-p将反编译的源代码输出到控制台窗口,然后使用重定向输出到jad-p example.class my example.Java文件
[4]将源代码文件输出到指定的目录: jad -dnewdir -sjava example.class,在newdir目录下生成example.java
[5]反编译包目录中的所有class文件: jad-sjava包/*.class
[6]反编译packages目录和子目录下的所有文件: jad -sjava packages/**/*.class,但所有源文件都位于同一个文件中,class
[7]反编译packages目录和子目录下的所有文件,并创建与java包匹配的文件夹路径。 -r命令:可以使用jad-r-Sjavapackages/*.class
重用[8]命令进行反编译时,Jad显示“whetheryouwanttooverwriteitornot”,并可以使用-o强制复盖旧文件
最权威的还是help :
野性的钢笔jad
jadv1.5. 8g.copyright 2001 pavelkouznetsov (jad @ KP dus.com)。
Usage: jad [option(s ) ]
options :-a-generatejvminstructionsascomments (annotate )
- af-outputfullyqualifiednameswhenannotating
- B-generateredundantbraces (braces ) ) () ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) 65 )
-clear - clear all prefixes,including the default ones
-d
- deadtrytodecompiledeadpartsofcode (ifthereareany ) )。
-仅禁用(禁用) )。
- f-generatefullyqualifiednames (full names ) )。
- ff-outputfieldsbeforemethods (fields first ) )。
- I-printdefaultinitializersforfields (定义) )。
- l-splitstringsintopiecesofmaxchars (splitstr ) )
- lnc-outputoriginallinenumbersascomments (lnc )。
- l radix-displaylongintegersusingthespecifiedradix
- nl-splitstringsonnewlinecharacters (splitstr ) )。
- noconv-don ' tconvertjavaidentifiersintovalidones (noconv ) )。
- no cast-don ' tgenerateauxiliarycasts
- no class-don ' t convert.class operators
- no code-don ' tgeneratethesourcecodeformethods
- noctor-suppresstheemptyconstructors
- nodos-turnoffcheckforclassfileswrittenindosmode
- nofd-don ' tdisambiguatefieldswiththesamenames (nofldis ) )。
- no inner-turnoffthesupportofinnerclasses
- no lvt-ignorelocalvariabletableentries (no lvt ) )。
-非B-don ' tinsertanewlinebeforeopeningbrace (非B ) )。
- o-overwriteoutputfileswithoutconfirmation
-对sendalloutputtostdout (for piping ) )。
- pa-prefixforallpackagesingeneratedsourcefiles
- PC-prefixforclasseswithnumericalnames (default : _ cls ) )。
- PE-prefixforunusedexceptionnames (default : _ ex ) )
- pf-prefixforfieldswithnumericalnames (default : _ fld ) )。
- pi-packimportsintoonelineusing.* (pack imports )
- pl-prefixforlocalswithnumericalnames (default : _ LCL ) )。
- pm-prefixformethodswithnumericalnames (default : _ mth ) )。
- PP-prefixformethodparmswithnumericalnames (default : _ PRM ) )。
- PV-packfieldswithesametypesintooneline (pack fields ) )。
- restorepackagedirectorystructure
- radix-displayintegersusingthespecifiedradix (8,10,or 16 ) )。
- s -输出文件扩展(default :jad ) )。
- safe-generateadditionalcaststodisambiguatemethods/fields
- space-outputspacebetweenkeyword (if,while,etc ) and expression
- stat-showthetotalnumberofprocessedclasses/methods/fields
- t-usespacesforindentation (default :4 ) ) ) ) ) )。
- t-usetabsinsteadofspacesforindentation
- v-showmethodnameswhiledecompiling
-8- convertunicodestringsintoansistrings (ansi )
- - redirect STDERR to STDOUT