javap 简介
Disassembles one or more class files.
及反汇编一个或多个class文件
使用介绍
javap [options] classfile ...
classfile 使用 classpath下的或者classfile 描述本身是全路径的。
options 是命令行参数
javap 的输出默认是到 stdout
Options 详解
-
-help --help -?
-
-version
print release information -
-l
prints line and local variable tables -
-public
shows only public classes and members -
-protected
Shows only protected and public classes and members. -
-private -p
Shows all classes and members. -
-Joption
Passes the specified option to the JVM -
-s
Prints internal type signatures. -
-sysinfo
Shows system information (path, size, date, MD5 hash) of the class being processed. -
-constants
Showsstatic final
constants. -
-c
Prints disassembled code, for example, the instructions that comprise the Java bytecodes, for each of the methods in the class. -
-verbose
Prints stack size, number of locals and arguments for methods. -
-classpath path
Specifies the path thejavap
command uses to look up classes. Overrides the default or theCLASSPATH
environment variable when it is set. -
-bootclasspath path
Specifies the path from which to load bootstrap classes. By default, the bootstrap classes are the classes that implement the core Java platform located injre/lib/rt.jar
and several other JAR files. -
-extdir dirs
Overrides the location at which installed extensions are searched for. The default location for extensions is the value ofjava.ext.dirs
.
使用下来 javap -verbose 的使用更有意义一点
网友评论