craftforJ
craftforJ is the visual development environment that ships with webforJ. It runs inside your app in development mode and gives you a live view of the components your Java code created. You can select a component, change its properties, see the running app update immediately, and write the changes you want to keep back into the Java file that created them.
Because craftforJ reads the app through webforJ itself, it describes the app in the terms you wrote it in. The tree lists your components rather than the markup the browser rendered, the properties are the ones your components declare, and the routes are the ones your router registered, together with the access rules you annotated them with.
What you can do with it
- Inspect components - browse the component tree, select a component by clicking it in the page, and change its properties while the app runs.
- Write changes to source - review your live edits as a diff and apply them to your Java files.
- Work with routes - see the routing table, navigate to any route, and change the access rules declared on it.
- Theme the app - adjust the design tokens your app is built from and save the result into your stylesheet.
- Use the AI agent - a coding agent inside the running app that writes Java freely, compiles what it wrote, and applies it with your approval.
How it differs from a debugger
A debugger pauses your code and shows you the state of your variables at that moment. craftforJ leaves the app running and shows you the interface your code produced, so you work with the result rather than the execution. The two answer different questions and are commonly used together.
Development mode only
craftforJ requires two separate settings to be enabled, and by default, it only answers to the browser running on the same machine as the app. Projects created with startforJ or from a webforJ archetype enable it for you, so it's available the first time you run them. See Security for what craftforJ can reach and how to confirm it's off in production.
Topics
Getting Started
Add the devtools dependency, enable craftforJ in your configuration, and open craftforJ over a running webforJ app.
Inspecting Components
Browse the component tree webforJ built, select components from the page, and change their properties while the app runs.
Writing Changes to Source
Review the changes you made in craftforJ as a diff, choose where each one is written, and apply them to your Java source.
Routes
See every registered route in a running webforJ app, navigate to it from craftforJ, and change the access rules declared on it.
Theme
Adjust the DWC design tokens of a running webforJ app, preview the result immediately, and save it into your stylesheet.
AI Assistant
A coding agent that works inside your running webforJ app, writes Java freely behind a compile gate, and applies changes with your approval.
Configuration
Every craftforJ configuration property, its default, and what turning each feature off changes.
Security
What craftforJ can reach in your project, how it restricts access, and how to confirm it's disabled in production.
App Info
Read the versions, Java runtime, and project root of the app craftforJ is attached to.
Troubleshooting
Fix the common cases where craftforJ doesn't appear, a feature is unavailable, or the assistant doesn't answer.