From 372b53f3b370031339b04926470ed60bd9e2c49f Mon Sep 17 00:00:00 2001 From: Alexander Kriegisch Date: Tue, 18 Jan 2022 09:10:40 +0700 Subject: Restructure README-198.html a bit Move usage hints about compiler preview features and LTw on JDK 16+ towards the end. Signed-off-by: Alexander Kriegisch --- docs/dist/doc/README-198.html | 49 ++++++++++++++++++++++++------------------- 1 file changed, 28 insertions(+), 21 deletions(-) (limited to 'docs/dist/doc/README-198.html') diff --git a/docs/dist/doc/README-198.html b/docs/dist/doc/README-198.html index 7e30661da..7088b13d6 100644 --- a/docs/dist/doc/README-198.html +++ b/docs/dist/doc/README-198.html @@ -37,16 +37,6 @@
  • Sealed classes (final in Java 17, previews in Java 15, 16 and AspectJ 1.9.7)
  • Pattern matching for switch
  • -

    - 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. -

    Improvements

    @@ -75,16 +65,6 @@ -

    Using LTW on Java 16+

    - -

    - Please note that if you want to use load-time weaving on Java 16+, the weaving agent collides with - JEP 396 (Strongly Encapsulate JDK Internals by Default). Therefore, - you need to set the JVM parameter --add-opens java.base/java.lang=ALL-UNNAMED in order to enable aspect - weaving. This is due to the fact that the weaver uses internal APIs for which we have not found an adequate - replacement yet when defining classes in different classloaders. -

    -

    Other changes and bug fixes

    +

    AspectJ usage hints

    + +

    Use LTW on Java 16+

    + +

    + Please note that if you want to use load-time weaving on Java 16+, the weaving agent collides with + JEP 396 (Strongly Encapsulate JDK Internals by Default). Therefore, + you need to set the JVM parameter --add-opens java.base/java.lang=ALL-UNNAMED in order to enable aspect + weaving. This is due to the fact that the weaver uses internal APIs for which we have not found an adequate + replacement yet when defining classes in different classloaders. +

    + +

    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. +

    + +
    +

    - Available: 1.9.8 available DD-MMM-2021 + Available: 1.9.8 available DD-MMM-2022

    -- cgit v1.2.3