Java 8 → 21, Angular.js → Angular 17 via agents
Java 8 to Java 21 and AngularJS to Angular 17 are two of the most common large-scale migration challenges in enterprise software engineering.
- ·Projects previously deemed "too expensive to modernize" are being modernized by agents at low cost
- ·Cross-repository migration agents operate across multiple codebases simultaneously
- ·Major version migrations (e.g., Java 8 to 21, Angular.js to Angular 17) are agent-driven
- ·Cost-per-migration-PR is tracked and decreasing
- ·Cross-repo migrations complete within defined SLAs (e.g., 100 repos migrated in 30 days)
Evidence
- ·Previously-stalled migration projects now in progress or completed with agent assistance
- ·Cross-repo migration agent logs showing multi-repository operation
- ·Major version migration PRs authored by agents with passing CI
What It Is
Java 8 to Java 21 and AngularJS to Angular 17 are two of the most common large-scale migration challenges in enterprise software engineering. They represent a class of migration that was previously considered high-risk, high-cost, and often deferred indefinitely: major version jumps across multiple breaking changes, affecting hundreds of thousands of lines of code, with no single automated tool that handles the full scope. At L4, AI agents executing in combination with structured refactoring tools (particularly OpenRewrite for Java) can execute both migration paths at a scale and speed that manual approaches cannot match.
The Java 8 to Java 21 migration is not a single jump - it is a sequence of migrations, each building on the previous: Java 8 to 11, 11 to 17, 17 to 21. Each step has its own set of breaking changes, deprecated APIs, and behavioral differences. OpenRewrite provides recipes for each step. An AI agent sequences the recipes, applies them in order, handles the residual failures at each step, and produces a working application on Java 21 after completing the sequence. The most significant challenge in this path is not the Java version itself but the ecosystem: Spring Boot versions, Jakarta EE namespace migration (javax to jakarta), and Hibernate upgrades that change lazy-loading behavior. An agent with access to the Spring migration guides and Jakarta migration documentation can handle most of these.
The AngularJS to Angular migration is structurally different. AngularJS (1.x) and Angular (2+) are different frameworks that share a name; there is no automated path from one to the other that preserves all application code. The migration strategy at L4 is the Strangler Fig pattern combined with agents: the agent migrates the application component by component, starting from the leaf components (those with no AngularJS dependencies) and working inward. Each migrated component is a modern Angular component that replaces its AngularJS predecessor. The agent handles the component conversion, TypeScript adaptation, and template migration; humans review the behavioral equivalence for each component.
Both migration paths at L4 share a common structure: agent-executed mechanical work (recipe application, API replacement, template conversion) validated by human review at each step, with the total human effort being review rather than authorship.
Why It Matters
- These two migration paths represent the majority of enterprise legacy debt - Java 8 and AngularJS are the two most widely deployed end-of-life versions in enterprise software; organizations with these migrations pending have the most to gain from L4 agent-based modernization
- Both were previously considered infeasible for large codebases - Manual migration of a large Java 8 codebase to Java 21 was estimated in years; agent-based migration collapses this to weeks; the infeasibility barrier was cost, not technical impossibility
- Security exposure is acute - Java 8 has been end-of-life for Oracle LTS support since 2019; AngularJS reached end-of-life in December 2021; organizations still running these versions are accumulating CVEs with no upstream fixes available
- Modern runtime capabilities unlock performance improvements - Java 21 virtual threads (Project Loom) and modern JVM optimizations can dramatically improve application performance; AngularJS-to-Angular migration enables module federation, improved SSR, and modern CDK components
- Demonstrates AI ROI at the executive level - A Java 8 to 21 migration completed in weeks via agents versus the multi-year estimate that made manual migration infeasible is the clearest possible demonstration of AI-driven productivity transformation
Getting Started
- For Java: start with the OpenRewrite migration recipe sequence - Use
org.openrewrite.java.migrate.UpgradeToJava17followed byorg.openrewrite.java.migrate.UpgradeToJava21. Run each recipe step-by-step, fixing failures before proceeding to the next. Do not skip intermediate versions; the recipe sequences are designed for incremental application. - For Java: handle the Jakarta namespace migration separately - The javax to jakarta package rename (required for Spring Boot 3+) is a distinct migration step with its own recipe:
org.openrewrite.java.migrate.jakarta.JavaxMigrationToJakarta. Run it after the Java version migration. - For AngularJS: audit the component tree first - Map the application's AngularJS component hierarchy. Identify leaf components (those that only depend on services, not on other AngularJS components). These are the first targets for agent-based migration.
- For AngularJS: configure the agent with Angular migration patterns - Load the AngularJS to Angular upgrade guide, the Angular migration style guide, and examples of migrated components into the agent's context. The agent needs reference patterns to follow; without them, the output will be syntactically correct but stylistically inconsistent.
- For both: establish a component-level test-validate-merge cycle - Do not attempt to migrate the entire application before testing. Migrate a batch of components or a set of API changes, test, merge, then proceed. The incremental approach catches regressions early and keeps the migration branch close to the main branch.
- Plan for performance testing post-migration - Both migrations can change application performance in significant ways. Java 21 virtual threads behave differently from platform threads in some edge cases; Angular's change detection differs from AngularJS's two-way binding in ways that can affect UI responsiveness. Add performance testing to the migration acceptance criteria.
For the Java migration, the Jakarta namespace change is where most agent failures occur - it affects not just imports but also XML configuration files, property files, and occasionally runtime reflection. Load the Jakarta migration compatibility guide into the agent's context explicitly; this single document resolves the majority of Jakarta-related failures.
Common Pitfalls
Attempting the full Java 8 to 21 migration in one shot. The recipe sequence must be applied incrementally. Organizations that try to apply all recipes simultaneously produce a codebase with compounded failures that are extremely difficult to debug. Step by step, with a green test suite at each step, is the only reliable approach.
Migrating AngularJS code to Angular without TypeScript fluency. Angular requires TypeScript; AngularJS applications are typically JavaScript. Agents can convert JavaScript to TypeScript, but the result requires review for type accuracy. An organization without TypeScript experience should invest in TypeScript training before or alongside the migration.
Ignoring the deployment and build pipeline changes. Both migrations require build tool changes: Java 21 requires updated Gradle/Maven configurations, compiler flags, and potentially container base images. AngularJS to Angular requires a complete rebuild pipeline change (webpack config, build tooling, CDN configuration). These infrastructure changes are not handled by migration recipes and must be planned separately.
Not involving the application teams in the migration. Cross-cutting migrations run by a central agent team, merged without the application team's review, will produce code that the team does not understand and cannot maintain. Application teams must review and own the migrated code. The agent does the work; the team approves and learns.
Underestimating the behavioral testing requirement. Both Java 8 to 21 and AngularJS to Angular introduce subtle behavioral changes that unit tests do not always catch. Integration tests and manual regression testing are essential, particularly for user-facing behavior in the AngularJS case where UI interactions may behave differently under Angular's zone-based change detection.
How Different Roles See It
Bob has two major applications that have been on Java 8 since 2016 and "scheduled for migration" since 2019. Both are large - one is 200,000 lines of Java, the other is a 150,000-line AngularJS frontend. Both have been blocked by migration cost estimates that range from 6 months to a year of engineering time each. Both are accumulating CVEs and compatibility issues that are starting to cause actual operational problems.
Bob should scope a pilot migration for each. For the Java application: one service within the broader application (not the whole monolith), using the OpenRewrite recipe sequence, with an agent handling the residual. Scope: 20,000 lines, 3-week timeline, one engineer reviewing. For the AngularJS application: 10 leaf components, using the agent-based component migration approach, with the application team doing behavioral review. Both pilots will produce real data on agent-based migration velocity for these specific codebases, which is more useful than estimates. Bob should plan the pilots for next month.
Sarah has been carrying the Java 8 migration risk on her organizational risk register for three years. Every quarter she notes that the risk is increasing (more CVEs, further from active support, more incompatible with modern infrastructure) but the migration is not progressing. The agent-based migration approach changes the risk calculus entirely: the mitigation action is no longer a 12-month project but a 4-week agent-based process with human review.
Sarah should update the risk register and the business case. The cost of maintaining Java 8 (security risk, infrastructure maintenance, developer experience degradation, inability to adopt modern libraries) versus the cost of agent-based migration (weeks of elapsed time, days of human review, hundreds of dollars in API costs) now clearly favors migration. Sarah should present this updated analysis to leadership with a specific recommendation: fund the pilot migration this quarter, evaluate the results, and authorize the full migration based on pilot data.
Victor has been the blocking factor on the Java 8 migration for three years because every time it was proposed, his honest estimate was "this will take me and another senior engineer six months and we will deliver nothing else during that time." That estimate was accurate for manual migration. It is not accurate for agent-based migration.
Victor ran a test on a 15,000-line module last week: ran the OpenRewrite sequence, had the agent fix the residual failures, reviewed the output over two days. The module is on Java 21. His hands-on time: 10 hours. His revised estimate for the full application: 8 weeks elapsed, 80 hours of Victor's review time. He is no longer the blocking factor - he is the person who can make this happen. Victor should present his revised estimate to Bob with a specific migration plan and timeline, and should be the tech lead for the migration project. His credibility makes the proposal credible.
Further Reading
From the Field
Recent releases, projects, and discussions relevant to this maturity level.
Where does your team actually sit on this?
This guide describes one level of one area. Run the assessment to place your team across all 16 areas, see which gates you have passed, and get a report you can take to your stakeholders.
Tech Debt & Modernization