Language support

Move every Java repo to a supported version in one coordinated run.

Java 8 through 25, plus framework migrations, dependency updates, and CVE remediation. One engine, one recipe catalog, one PR review process.

The broadest recipe catalog, on a compiler-accurate model.

Java is the original target of OpenRewrite. Every Java file is parsed into a compiler-accurate model of the source, and every recipe operates against it.

The Moderne recipe builder for a Java best-practices recipe, showing the composed recipe graph and its security sub-recipes.

Compiler-accurate by default.

Recipes run against a compiler-accurate model of your code, not a regex. Symbol resolution, type attribution, comments, and formatting are preserved on every run. Reviewers see the transformation, not whitespace churn.

Concrete Java migration paths.

Every path below is a recipe (or recipe chain) shipped today. Browse the full catalog at docs.moderne.io.

Version upgrade
  • Java 8 → 11 Language-feature migrations, removed APIs, module-system adjustments, and dependency updates for the 8-to-11 jump.
  • Java 11 → 17 Sealed classes, pattern matching, switch expressions, and removed deprecated APIs. Build-tool plugin alignment included.
  • Java 17 → 21 Record patterns, virtual threads, and migration off internal JDK APIs. Build files and CI configuration updated alongside source.
  • Java 21 → 25 Latest LTS (Sept 2025). Recipes target the API changes and removed previews between 21 and 25.
Framework
  • javax → jakarta Jakarta EE namespace migration across imports, dependencies, and APIs. The canonical use case for semantic refactoring at portfolio scale.
Tests
  • JUnit 4 → JUnit 5 Annotation mapping, lifecycle conversion, assertion rewriting, and Maven or Gradle dependency updates.
  • JUnit 5 → JUnit 6 The current hop. Migration runs from JUnit 5.x; estates still on JUnit 4 take the 4 → 5 chain above first.
Security
  • Log4Shell and CVE patches Drop-in remediation for Log4j 1.x and 2.x, plus a catalog of vulnerable dependency replacements with locked-in upgrade targets.
Dependencies
  • Maven and Gradle hygiene Manage and upgrade Maven (71 recipes) and Gradle (46 recipes) dependencies across the estate, including transitive resolution.
Quality
  • Static analysis cleanup 180+ static-analysis rules modeled on the standards your team already uses, applied consistently across every repo.
Our developers now spend less time worrying about legacy code and more time focusing on value-driven work.
Jason Simpson VP of Engineering, Choice Hotels Read the case study

Java upgrades, answered.

Java modernization is the process of upgrading Java codebases, libraries, and frameworks to secure, supported versions, and consistently applying best practices (that can be custom to your organization).

The most reliable approach to modernizing Java code is automated Java refactoring. By using semantic transformations instead of manual edits or regex, enterprises can modernize Java code safely while preserving formatting, style, and comments.

Leading organizations use platforms like Moderne to orchestrate migrations across their entire code estate. Instead of upgrading one application at a time, teams can modernize thousands of repositories in parallel with tested, repeatable recipes.

Yes. Moderne was built for multi-repo environments, applying upgrades simultaneously across all repositories to ensure consistency and eliminate code drift.

OpenRewrite provides the recipes that define how to modernize Java code. These recipes capture best practices for version upgrades, security patches, and framework migrations. Moderne scales those recipes across enterprise estates with orchestration, auditability, and collaboration.

Yes. Moderne ensures upgrades are deterministic, testable, and delivered as clean diffs in pull requests. Teams can review and validate changes with confidence before they reach production.

Modernize Java once. Then keep it that way.