Skip to main content

Prerequisites

Open in ChatGPT

Getting started with webforJ is simple, because there are only a couple of prerequisites. Use this guide to set up your development environment with the essential tools you will need to get up and running with webforJ.

Java Development Kit (JDK)

webforJ requires Java 21 or higher. Any distribution at that version works, so pick the one your team already uses.

Recommended for development

Develop on a JetBrains Runtime build. It accepts the -XX:+AllowEnhancedClassRedefinition option, which is what lets a hotswap tool carry a change to the structure of a class, a new field or a new method, into the running app.

On any other build, edits inside a method body still apply in place, and a change to the structure of a class waits for a restart. The choice only concerns the machine you develop on, and it doesn't affect what you package or where you deploy it.

A version manager is the easiest way to install a JDK, and the easiest way to move between versions later. SDKMAN! covers UNIX systems, and Jabba covers UNIX systems and Windows. Under SDKMAN!, sdk install java 21.0.11-jbr gets you a JetBrains Runtime.

To download a build yourself instead:

Run java -version to confirm which version is on your path.

Build tool

webforJ builds with Maven or Gradle. Archetypes generate Maven projects, so Maven is the quickest way to a new app, and an existing Gradle build works the same way.

Install Maven from the Apache Maven download page, following Maven's installation instructions or Baeldung's guide for each operating system.

Run mvn -v to confirm the install.

Either build runs webforJ's build time work through the webforJ build plugin, which a project created from an archetype already has.

Editor

Any editor with Java support works, so use the one that fits your workflow. Common choices:

  • IntelliJ IDEA: Java support and a plugin ecosystem out of the box.
  • Visual Studio Code: A lightweight editor that takes its Java support from extensions.
  • Zed: A code editor that picks up Java through an extension, which downloads and manages the Eclipse Java language server for you.