Expand my Community achievements bar.

Submissions are now open for the 2026 Adobe Experience Maker Awards.
SOLVED

AEM 6.5 and Java Versions (1.8 vs 11)

Avatar

Level 5

We currently run AEM under Java 1.8 but are developing a new codebase using an archetype requiring Java 11 to build the project. 

Our other site codebases are built (and run in AEM) using Java 1.8.

Our new code base is built using Java 11 but I believe uses a config that targets Java 1.8, so as to be compatible with AEM running under Java 1.8.

Is it possible to run AEM 6.5 under Java 1.8 and run code built with Java 11, alongside other site code built using Java 1.8?

Is it possible to run AEM 6.5 under Java 1.8 and then switch to running it under Java 11? 

 

Thanks for any info. 

 

 

 

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor and Adobe Champion

Is it possible to run AEM 6.5 under Java 1.8 and run code built with Java 11, alongside other site code built using Java 1.8?
-> As long as the Java 11 code is built using java 8 plugin for bytecode conversion, then you should be good running this on AEM which is on 1.8.

<plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.8.1</version>
        <configuration>
          <release>8</release>
        </configuration>
</plugin>

If you're not doing this then it is NOT recommended to have different java version for code build and different version for JVM for AEM 6.5, it can have incompatibility issues.

Is it possible to run AEM 6.5 under Java 1.8 and then switch to running it under Java 11? 
-> Yes, although you will have to rebuild (on Java 11) and deploy all the custom bundles which were earlier built on Java 1.8

 

It is highly recommended to update to AEM 11 as Adobe has already released AEM 6.5.2025 which supports Java 17 https://experienceleague.adobe.com/en/docs/experience-manager-65-lts/content/release-notes/release-n... and will be coming up with Java 21 in near future.

View solution in original post

4 Replies

Avatar

Correct answer by
Community Advisor and Adobe Champion

Is it possible to run AEM 6.5 under Java 1.8 and run code built with Java 11, alongside other site code built using Java 1.8?
-> As long as the Java 11 code is built using java 8 plugin for bytecode conversion, then you should be good running this on AEM which is on 1.8.

<plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.8.1</version>
        <configuration>
          <release>8</release>
        </configuration>
</plugin>

If you're not doing this then it is NOT recommended to have different java version for code build and different version for JVM for AEM 6.5, it can have incompatibility issues.

Is it possible to run AEM 6.5 under Java 1.8 and then switch to running it under Java 11? 
-> Yes, although you will have to rebuild (on Java 11) and deploy all the custom bundles which were earlier built on Java 1.8

 

It is highly recommended to update to AEM 11 as Adobe has already released AEM 6.5.2025 which supports Java 17 https://experienceleague.adobe.com/en/docs/experience-manager-65-lts/content/release-notes/release-n... and will be coming up with Java 21 in near future.

Avatar

Level 5

@Jineet_Vora Thank you, this is very helpful info!

Avatar

Community Advisor

Hi @this-that-the-otter,

 

Since you're running AEM 6.5 on-premise, here's a detailed breakdown based on your questions about Java 8 and Java 11 compatibility:

 

1. Can you run AEM 6.5 under Java 1.8 and also deploy code compiled with Java 11?
Not recommended.
Even if code compiled with Java 11 targets Java 8 (via --release 8 or target=1.8), this setup is not guaranteed to work reliably with AEM 6.5 running under Java 8. Here’s why:

  • Java 11 introduces bytecode and APIs that may behave differently even if you down-compile the bytecode.
  • Third-party dependencies compiled for Java 11 may bring in transitive classes that are incompatible with Java 8.
  • You may hit UnsupportedClassVersionError at runtime if any compiled class exceeds Java 8 compatibility.

Recommendation: If AEM is running under Java 8, ensure all code is compiled and built for Java 8 (maven-compiler-plugin). Avoid mixing build/runtime environments between Java 8 and Java 11.

 

2. Can you switch AEM 6.5 from Java 1.8 to Java 11?
Yes, AEM 6.5.4.0+ is compatible with Java 11.

Requirements:

  • You must be running AEM 6.5 Service Pack 4 or higher.
  • Official Adobe documentation lists Java 11 LTS (e.g., AdoptOpenJDK or Oracle JDK) as supported.

Official reference: AEM 6.5 Supported Platforms

"Starting with AEM 6.5.4.0, Java 11 is supported."

Important considerations before switching:

  • Validate all custom code and bundles for Java 11 compatibility.
  • Update Maven toolchains and build settings to target Java 11 (not just compile, but also unit tests and static analysis).
  • Ensure all third-party libraries are also Java 11 compatible.
  • Update start scripts, JVM options, and monitor for GC tuning differences.

Recommended Strategy
To move forward:

  • Migrate AEM 6.5 to Java 11 (if you’re on 6.5.4.0+).
  • Standardize builds for Java 11 across all codebases.
  • Avoid mixing runtimes (i.e., don’t build with Java 11 and deploy into Java 8 AEM).
  • If keeping Java 8, make sure all code (even new code) targets Java 8 fully.

Best regards,

Kostiantyn Diachenko.

Kostiantyn Diachenko


Check out AEM VLT Intellij plugin


@konstantyn_diachenko  And thank you so much for even more detailed info!