---
title: "Prepare your first build"
description: "Create an immutable plan, select a runtime, and handle validation errors."
kind: "guide"
id: "guide:prepare-a-build"
module: "runtime-kit"
version: "1.0"
---

# Prepare your first build

[runtime-kit](../index.md) › Guides · Every page: [llms.txt](../llms.txt)

*Create an immutable plan, select a runtime, and handle validation errors.*

## Choose an entry point

Use [`BuildPlan.defaults(String)`](../example/runtime/BuildPlan.md#defaults%28java.lang.String%29) for a plan with no extra compiler flags. The entry point is the fully qualified class name.

```java
var plan = BuildPlan.defaults("example.Main");
```

## Select the runtime

Construct a [`Planner.Local`](../example/runtime/Planner.Local.md) for the JVM. For fine-grained progress reporting, pass [`Planner.Options`](../example/runtime/Planner.Options.md) to the overloaded constructor.

```java
var planner = new Planner.Local(Target.JVM);
```

## Validate the plan

Preparation returns the validated plan. A blank entry point raises [`PlanException`](../example/runtime/PlanException.md) before execution.

```java
try {
  var ready = planner.prepare(plan);
  System.out.println(ready.mainClass());
} catch (PlanException rejected) {
  System.err.println(rejected.getMessage());
}
```

---

Previous: [Write a preparation step](custom-step.md)
