Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-announce] AspectJ 1.9.22 release (Java 22)

Dear AspectJ users,

we are pleased to announce AspectJ release. AspectJ 1.9.22 supports Java 22, its final and preview features, such as:

  • JEP 456: Unnamed Variables & Patterns
  • JEP 459: String Templates (Second Preview)
  • JEP 463: Implicitly Declared Classes and Instance Main Methods (Second Preview)
  • JEP 447: Statements before super(...) (Preview)

The following Java 22 features are API or JVM only, therefore irrelevant for the compiler and should just work out of the box:

  • JEP 423: Region Pinning for G1
  • JEP 454: Foreign Function & Memory API
  • JEP 458: Launch Multi-File Source-Code Programs
  • JEP 462: Structured Concurrency (Second Preview)
  • JEP 464: Scoped Values (Second Preview)
  • JEP 457: Class-File API (Preview)
  • JEP 461: Stream Gatherers (Preview)
  • JEP 460: Vector API (Seventh Incubator)

Usage hints

  • 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.7, the AspectJ compiler AJC needed JDK 11+, before then JDK 8+.
  • Since AspectJ 1.9.21.1, using --add-opens is no longer necessary for load-time weaving on JDK 16+! The additional JVM command-line option was necessary in all AspectJ versions up to 1.9.21.

Resources

  • For more detailed release information, please read the release notes.
  • The current artifacts (runtime, weaver, compiler, matcher) are available on Maven Central.
  • The AspectJ installer can be found on GitHub.
  • There is also an AJDT update site for Eclipse 4.31 (2024-03). Unfortunately, updates sites for previous Eclipse versions are no longer compatible with AspectJ 1.9.22, because the latter depends on upstream Eclipse changes. So if you want to use ADJT builds with Eclipse IDE, you need to upgrade to 2024-03. Otherwise, you can only use AspectJ 1.9.22 via Maven build, not via direct IDE.
  • Documentation for AspectJ can be found here on the Eclipse project website.
  • There also is a short guide describing options for setting up a development environment.
  • See here for more information about how to upgrade to the latest AspectJ version when using dev.aspectj:aspectj-maven-plugin:1.14.

Enjoy AspectJ!

The AspectJ team


Back to the top