CLASS
Generated by scripts/gen-format-pages.py from docs/data/format-metadata/, FILE_FORMATS.csv and docs/formats-master.csv. Do not edit by hand: change the source, then run the script.
Java .class Preview.
At a glance
| Purpose | A compiled Java class file: the bytecode, constant pool, fields and methods of one class. |
| Extensions | .class |
| Poka parser | poka-class |
| Viewer | poka-tree-viewer |
| Depth tier | Parser with a shared viewer (see Depth tiers) |
| Breadth tier | B2 Broad (see Breadth tiers) |
How much Poka reads
B2 Broad. The common content of the current and the common older versions is decoded. Some named features or versions are not, and are listed.
Confidence: medium (the reviewer read the code). Basis: Reviewed 2026-10-26: read parsers/poka-class/src/main.rs (669 lines) and plugin.json. No unit tests or tests/samples.rs; the corpus has commons-bcel_StackMapExample2.class, Logger.class, LoggerFactory.class and others, read by no test. Covers .class. The tree resolves names through the constant pool and shows the class name, access flags, version and superclass, the interfaces, the fields and methods with their decoded type descriptors, and the constant pool. Judgement: B2: the class's declarations are decoded in full, but method bodies and attributes are not.
What Poka does not read
- Bytecode (the Code attribute) is not disassembled
- Attributes are skipped: annotations, generic signatures, inner classes, source file and line numbers
- Only the first 16 MiB is read; caps of 3,000 nodes
Libraries
Libraries Poka uses or has assessed for this format, with the status, licence and language the registry records.
- jclassfile (candidate; MIT; Rust; https://docs.rs/crate/jclassfile/latest) — Java class file parser; v0.6.1 per docs.rs; part of rusty-jvm repo
- classfile-parser (candidate; MIT; Rust; https://github.com/Palmr/classfile-parser) — nom-based parser; v0.3.8 (Oct 2024)
- cafebabe (candidate; 0BSD; Rust; https://lib.rs/crates/cafebabe) — Simple class file parser; v0.9.0 (Jun 2025); resolves constant pool references
- noak (candidate; MIT; Rust; https://github.com/frozolotl/noak) — Bytecode decoding and encoding; README states MIT, repo also contains LICENSE-APACHE
- Apache Commons BCEL (candidate; Apache-2.0; Java; https://commons.apache.org/proper/commons-bcel/) — Analyse, create and manipulate class files; page notes limited recent development
Sources
- parsers/poka-class/src/main.rs
- parsers/poka-class/plugin.json