javap
READMEThis document describes how to obtain and use a version of the
javap
class disassembler that has been modified to parse and
display both JSR 175 and JSR 308 annotations.
Contents:
“JSR 308 javap
” is a modification of the OpenJDK 7
javap
class disassembler that can display information about
annotations. The unmodified javap
tool displays hexadecimal dumps
of each attribute in a class file that it does not recognize, including the
attributes that contain annotations. JSR 308 javap
parses
annotation-containing attributes as specified by JSRs 175 and 308. It displays
the types and arguments for both kinds of annotations, and additionally
displays the internal fields of JSR 308 annotations as specified in Section
4 of the JSR 308 proposal.
The "Building the compiler" section below contains
instructions for building and running the JSR 308 javap
tool.
javap
tool
The following steps will create an executable jar file for running the
javap
tool.
javap
tool, by running ant
in
directory openjdk/j2se/src/share/opensource/javap
.
javap
using the following command:
java -jar openjdk/j2se/src/share/opensource/javap/javap.jar
Alternatively, you may add
openjdk/j2se/src/share/opensource/javap/javap.jar
to the front
of your CLASSPATH
environment variable and use:
java sun.tools.javap.Main