CSC300: Python to Java: Disassemblers and decompilers [40/40] Previous pageContents

The java SDK distributes with command-line tool javap. This is a disassembler

Try this from your workspace directory:

javap -c -l -s -sysinfo -constants bin/algs11/Hello.class

This will show you java bytecode [Search]

Here are the meaning of the options of javap:

  -c           Disassemble the code
  -constants   Show final constants
  -l           Print line number and local variable tables
  -s           Print internal type signatures
  -sysinfo     Show system info (path, size, date, MD5 hash) of class

  -public      Show only public classes and members
  -protected   Show protected/public classes and members
  -package     Show package/protected/public classes and members (default)
  -p  -private Show all classes and members

  -v  -verbose Print additional information

There are also decompilers

procyon and cfr are particularly nice.

Previous pageContents