Tip-javap 指令的用途与使用

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
    Shows static 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 the javap command uses to look up classes. Overrides the default or the CLASSPATH 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 in jre/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 of java.ext.dirs.

使用下来 javap -verbose 的使用更有意义一点

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

友情链接更多精彩内容