Java, Lua, and PE files
glaurung classfile
Read Java class metadata from a .class file or JAR.
use it for
The report includes classes, methods, fields, descriptors, and archive metadata. It does not recover a buildable source tree.
Run glaurung classfile --help on your installed version before putting the command in a script.
Glaurung is still pre-1.0.
- input
- A Java .class file, JAR, or ZIP archive.
- output
- Classfile version, class hierarchy, access flags, fields, methods, descriptors, and archive counts.
- mode
- read only. The examples leave the input unchanged.
command shape
syntax
$ glaurung classfile PATH [--json]
The installed parser is authoritative: glaurung classfile --help
run it
examples
Inventory a JAR without a model
classfile is the cheap first pass before Java agent or recovery workflows.
run
$ glaurung classfile samples/binaries/platforms/windows/amd64/export/java/jdk17/HelloWorld.jar output
# HelloWorld.jar: 1 class file(s)
class HelloWorld (Java 17 (classfile 61.0))
extends java/lang/Object
access: public
fields: 3
private static final GLOBAL_COUNTER: I
private message: Ljava/lang/String;
methods: 6
public <init>(Ljava/lang/String;)V
public printMessage()V
public static main([Ljava/lang/String;)V captured tutorial fixture, shortened.
Read the result: Descriptors preserve JVM types exactly. This is metadata inspection, not recovered Java source.
Filter the method list
Plain output composes with ordinary shell tools when you need a quick inventory.
run
$ glaurung classfile samples/binaries/platforms/windows/amd64/export/java/jdk17/HelloWorld.jar --no-color | rg '^ public' output
public <init>(Ljava/lang/String;)V
public <init>()V
public printMessage()V
public getCounter()I
public static printGlobalInfo()V
public static main([Ljava/lang/String;)V captured from the checked-in JAR, 2026-08-31.
Read the result: This filter shows public methods only. It drops the class header and private members, so keep the unfiltered report when completeness matters.
used above
important options
These are the flags used by the examples. Run glaurung classfile --help for the complete parser help.
keep working