Expand my Community achievements bar.

SOLVED

New AEM cloud project. Should I be using Java 11 or Java 8 to compile my project?

Avatar

Level 1

Simple question. I want to be able to use the updated interfaces and new features offered in Java 11. AEM documentation says it supports java 11. Can I use it to compile the code? Will it work fine with Cloud Manager? 

 

Please advice. Thanks

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @hades0202 

 

Cloud Manager now supports building projects with both Java 8 and Java 11. By default, projects are built using Java 8.
Customers who want to use Java 11 in their projects can do so using the Apache Maven Toolchains Plugin by adding the below <plugin> entry in the pom.xml

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-toolchains-plugin</artifactId>
<version>1.1</version>
<executions>
<execution>
<goals>
<goal>toolchain</goal>
</goals>
</execution>
</executions>
<configuration>
<toolchains>
<jdk>
<version>11</version>
<vendor>oracle</vendor>
</jdk>
</toolchains>
</configuration>
</plugin>

Please see the article from Adobe:

https://experienceleague.adobe.com/docs/experience-manager-cloud-service/onboarding/getting-access/c...

 

Hope this helps!

Thanks

View solution in original post

3 Replies

Avatar

Correct answer by
Community Advisor

Hi @hades0202 

 

Cloud Manager now supports building projects with both Java 8 and Java 11. By default, projects are built using Java 8.
Customers who want to use Java 11 in their projects can do so using the Apache Maven Toolchains Plugin by adding the below <plugin> entry in the pom.xml

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-toolchains-plugin</artifactId>
<version>1.1</version>
<executions>
<execution>
<goals>
<goal>toolchain</goal>
</goals>
</execution>
</executions>
<configuration>
<toolchains>
<jdk>
<version>11</version>
<vendor>oracle</vendor>
</jdk>
</toolchains>
</configuration>
</plugin>

Please see the article from Adobe:

https://experienceleague.adobe.com/docs/experience-manager-cloud-service/onboarding/getting-access/c...

 

Hope this helps!

Thanks

Avatar

Level 1
Hello, thanks for replying. Yes, I think this help. Are you aware of any know issues when using java 11 in AEM?

Avatar

Community Advisor

Hi @hades0202 

 

I am using JDK 11 on both AEM 6.5 (2 years) and Cloud (1 year) and have not seen any issue so far.