© Copyright 2025 Contributors. All rights reserved.
Release info: 1.9.25 available 27-Oct-2025
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.25 can be found here:
AspectJ 1.9.25 supports Java 25, its final and preview features:
-
470: PEM Encodings of Cryptographic Objects (Preview)
-
502: Stable Values (Preview)
-
503: Remove the 32-bit x86 Port
-
505: Structured Concurrency (Fifth Preview)
-
506: Scoped Values
-
507: Primitive Types in Patterns, instanceof, and switch (Third Preview)
-
508: Vector API (Tenth Incubator)
-
509: JFR CPU-Time Profiling (Experimental)
-
510: Key Derivation Function API
-
511: Module Import Declarations
-
512: Compact Source Files and Instance Main Methods
-
513: Flexible Constructor Bodies
-
514: Ahead-of-Time Command-Line Ergonomics
-
515: Ahead-of-Time Method Profiling
-
518: JFR Cooperative Sampling
-
519: Compact Object Headers
-
520: JFR Method Timing & Tracing
-
521: Generational Shenandoah
Some of these are API/JVM only so don’t affect the compiler and should just work on Java 25 runtimes.
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.
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+.
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.
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.