Skip to content
Java Class file parser and analyzer written in Clojure
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
src/class_analyzer implement wide opcodes Dec 1, 2019


A disassembler library for Java Class files.

The purpose of the project is to provide an idiomatic Clojure framework for disassembling Java Class files based on the Java Virtual Machine Specification.

It is also a fun topic to learn about the quirks and oddities of a commonly used VM ecosystem.

The program is validated by running it on a selection of class files on the developer's ~/.m2 folder. For testing purposes, an output layer is provided that renders in the same format as javap does and we validate that every byte of the outputs match. Therefore, it can be also used as a drop-in replacement of the standard Java disassembler.

Written in Clojure Hello Visitors


You can embed it as a library in your project, or run it as a standalone program: lein run [ARGS] [CLASSES]


  • -c: prints bytecode of methods (like in javap)
  • -l: prints line numbers and local variable tables (like in javap)
  • --x-edn: prints output as a nice EDN data structure instead of text.

For example, to run it on a class file from the Clojure source code.

lein run -- -c  clojure/asm/TypePath.class

You can check that the output is the same as with javap:

javap -c clojure.asm.TypePath


You will need Leiningen to run the tests.

  • Run unit tests with $ lein test command.
  • Run javap comparison tests with: $ lein test :javap


Copyright (c) Janos Erdos. All rights reserved. The use and distribution terms for this software are covered by the Eclipse Public License 2.0 ( which can be found in the file LICENSE.txt at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this notice, or any other, from this software.

You can’t perform that action at this time.