Expand my Community achievements bar.

SOLVED

Latest AEM SDK is not running with java 8

Avatar

Level 4

Screenshot (168).png

 

I have to check whether my current project which is in AEM 6.5 (jdk 1.8) will work on AemAACs or not and have seen many documentations mentioning AEM As a Cloud supports Java 8 and 11 both. Then what is the reason for this error. Could anyone please explain? If java 11 is now mandatory for AemAACs then how can I run both AEM 6.5 and AEMAACs together if my project has dependency on java 8.

Thanks

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

You can always run 2 application running on different Java version at same time. You can achieve this by setting one as default using system environment variable in your case it’s going to be JDK 8. Install JDK 11 and whenever you want to use application to run on JDK 11 you can set the java path temporarily through command prompt or by creating any scripts.

There are lots of tutorials available on this.

one for reference https://www.happycoders.eu/java/how-to-switch-multiple-java-versions-windows/

 

View solution in original post

6 Replies

Avatar

Community Advisor

According to the documentation Java 8 and 11 are officially available. In terms of AemAACs latest Java 11 is recommended. So if you can't run AEM in your local, here is one option:
You can install both Java 8 & 11 in your local machine and switch java versions based type of AEM you need to run.

 

Steps on windows:

https://www.happycoders.eu/java/how-to-switch-multiple-java-versions-windows/ 

 

Steps on Mac:

https://medium.com/@devkosal/switching-java-jdk-versions-on-macos-80bc868e686a 

Avatar

Level 4

so in this case, i wont be able to run both the jars simultaneously. Correct ?

Avatar

Community Advisor

you can run both the jars at same time.

I do that all the time.

 

I have java11 bin path as a environment variable and I used that when I run aemaacs-jar.



Arun Patidar

Avatar

Employee Advisor

AEM as a Cloud Service runs on Java 11, that means that some parts depend on Java 11. For that reason I would strongly suggest to run the SDK with java 11.

 

On the other hand, you can still build your code using java8 and for Java8 (and not using any features of Java 11), and this code will run perfectly fine on AEM CS and Java 11.

Avatar

Correct answer by
Community Advisor

You can always run 2 application running on different Java version at same time. You can achieve this by setting one as default using system environment variable in your case it’s going to be JDK 8. Install JDK 11 and whenever you want to use application to run on JDK 11 you can set the java path temporarily through command prompt or by creating any scripts.

There are lots of tutorials available on this.

one for reference https://www.happycoders.eu/java/how-to-switch-multiple-java-versions-windows/