AspectJ 1.9.26

© Copyright 2026 Contributors. All rights reserved.

Release info: 1.9.26 available Oct-2026

Please note that Bugzilla for issue management is deprecated and new issues should be filed as GitHub issues. The list of issues addressed for 1.9.26 can be found here:

New features

AspectJ 1.9.26 supports Java 26, its final and preview features:

  • 500: Prepare to Make Final Mean Final

  • 504: Remove the Applet API

  • 516: Ahead-of-Time Object Caching with Any GC

  • 517: HTTP/3 for the HTTP Client API

  • 522: G1 GC: Improve Throughput by Reducing Synchronization

  • 524: PEM Encodings of Cryptographic Objects (Second Preview)

  • 525: Structured Concurrency (Sixth Preview)

  • 526: Lazy Constants (Second Preview)

  • 529: Vector API (Eleventh Incubator)

  • 530: Primitive Types in Patterns, instanceof, and switch (Fourth Preview)

Some of these are API/JVM only so don’t affect the compiler and should just work on Java 26 runtimes.

Improvements

  • No major improvements

Other changes and bug fixes

AspectJ 1.9.26 includes a number of changes to do more in depth verification of class files. This verification is intended to ensure bad data will cause AspectJ to fail with a proper exception rather than a stack overflow or an out of memory issue. Please raise an issue if you see anything that looks like the verification is being too strict, however the extra checks are not expected to cause any issues for class files resulting from typical usage of Java and AspectJ.

Importantly with the adoption of JDT Compiler later than 22, the versions of Java 1.1 > 1.7 are considered no longer supported so any attempt to specify a build for any of those Java versions will now fail immediately.

AspectJ usage hints

AspectJ compiler build system requirements

Since 1.9.21, the AspectJ compiler ajc (contained in the aspectjtools library) no longer works on JDKs 11 to 16. The minimum compile-time requirement is now JDK 17 due to upstream changes in the Eclipse Java Compiler (subset of JDT Core), which AspectJ is a fork of. You can still compile to legacy target versions as low as Java 1.3 when compiling plain Java code or using plain Java ITD constructs which do not require the AspectJ runtime aspectjrt, but the compiler itself needs JDK 17+. Just like in previous AspectJ versions, both the runtime aspectjrt and the load-time weaver aspectjweaver still only require JRE 8+.

History: Since 1.9.8, the AspectJ compiler ajc needed JDK 11+, before then JDK 8+.

Use LTW on Java 16+

Since AspectJ 1.9.21.1, using --add-opens is no longer necessary! The additional JVM command-line option was necessary for LTW on JRE 16+ in all AspectJ versions up to 1.9.21. Since AspectJ 1.9.21.1, the LTW agent uses an alternative approach for defining new classes during weaving, which works without --add-opens - at least for now, i.e. JDKs 8 to 22. There still is no canonical solution, because JDK-8200559 is still unresolved since 2018.

Compile with Java preview features

For features marked as preview on a given JDK, you need to compile with ajc --enable-preview and run with java --enable-preview on that JDK.

Please note, that you cannot run code compiled with preview features on any other JDK than the one used for compilation. For example, records compiled with preview on JDK 15 cannot be used on JDK 16 without recompilation. This is a JVM limitation unrelated to AspectJ. Also, e.g. sealed classes are preview-1 on JDK 15 and preview-2 on JDK 16. You still need to recompile, no matter what.