What 21 deprecated and restricted

Java 21 Course · lesson 13 of 15 · 3 min read

Three removals that can break an upgrade if you find them at deploy time instead of build time.

Open this lesson in the learning hub

Key points

  • Dynamic agent loading now warns; attaching an agent to a running JVM will need -XX:+EnableDynamicAgentLoading.
  • Some profilers and APM tools attach this way, so check your observability stack before upgrading.
  • The Windows 32-bit x86 port was deprecated for removal - 32-bit Windows builds are ending.
  • The security manager remains deprecated for removal; if you still call it, plan an exit.
  • Run jdeprscan against your jars before the upgrade, not after.

The riskiest part of a 21 upgrade is usually your monitoring agent, not your own code.

This is a reading copy. The full lesson — with the visual explainer, the interactive lab and a Run button for the code — lives in the Java 21 Course course, and every lesson in it is listed on the Java 21 Course contents page.