# What is jlox?

> jlox is the tree-walk interpreter for Lox written in Java in the first half of Crafting Interpreters. What it covers, chapter by chapter, and how long it takes.

**jlox**: jlox is the tree-walk interpreter for the Lox language, written in Java in chapters 4 to 13 of Crafting Interpreters.

**jlox** is the first of the two Lox interpreters in Crafting Interpreters: a [tree-walk interpreter](https://cracked.guide/glossary/tree-walk-interpreter) written in Java across chapters 4 to 13. It scans source into tokens, parses them into a syntax tree and evaluates the tree directly.

## What you build

Chapter by chapter: a scanner (4), an AST generator (5), a [recursive descent parser](https://cracked.guide/glossary/recursive-descent-parser) (6), an evaluator (7), statements and environments (8), control flow (9), functions and closures (10), a resolver pass for variable binding (11), classes (12) and inheritance (13).

Java's garbage collector and objects do a lot of the heavy lifting, which keeps jlox readable. The cost is speed: walking a tree of Java objects is slow, which is why the book builds [clox](https://cracked.guide/glossary/clox) next.

## How long it takes

On the cracked.guide path jlox is weeks 1 to 11, at about 8 to 10 hours a week, and each chapter's guide budgets its own hours. See the [Crafting Interpreters study plan](https://cracked.guide/learn/crafting-interpreters-study-plan) for the full schedule.

## Questions

### Can I write jlox in another language?

Yes, many people do, but you have to translate the book's Java as you go. The test suite still works: point it at your executable.

### Does jlox need a specific Java version?

No recent feature is required. Any current JDK works; the book's code is plain Java.

---

Source: https://cracked.guide/glossary/jlox
cracked.guide: A free, dated 145-week path to getting genuinely cracked at programming.
