menu

AEM Java Support

By: Chris McIlvoy / December 12th 2022 / Development
AEM Java Support

Ready to start development on your new shiny MacBook Pro?

Adobe Experience Manager (AEM) is the leading content management system that runs on Java.

The first item to address, then, is what version of Java you have available on your default macOS environment

/usr/libexec/java_home -V

This should produce a result like this:

15.0.1 (x86_64) "Oracle Corporation" - "OpenJDK 15.0.1"
/Library/Java/JavaVirtualMachines/jdk-15.0.1.jdk/Contents/Home
1.8.301.09 (x86_64) "Oracle Corporation" - "Java" /Library/Internet
Plug-Ins/JavaAppletPlugin.plugin/Contents/Home
1.8.0_111 (x86_64) "Oracle Corporation" - "Java SE 8"
/Library/Java/JavaVirtualMachines/jdk-1.8.0_111.jdk/Contents/Home
1.8.0_111 (x86_64) "Oracle Corporation" - "Java SE 8"
/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home

Now that we know what versions are installed, let us see what version Adobe supports (and if there is a match).

Java version list

This diagram shows support for Oracle 8 and 11 JDK basically or Azul 8 and 11.

Since we do not have Java 11 but would like to install, let us review couple of quick options for macOS.

An Adobe partner can log into Adobe admin console to get the required version (in this case, Java 11).

Bash approach

Confirm your default java by running:

java -version

Then open your bash profile:

open ~/.bash_profile

Scroll to bottom and enter and save this:

export JAVA_HOME=`/usr/libexec/java_home -v 1.11`

SDKMan

Here at Content Thread, we enjoy the convenience of this 3rd party tool called SdkMan.

The docs are amazing; so, we will not repeat them here.

This tool is really valuable for when you have many varying AEM versions running that require different Java versions. It vastly simplifies switching between versions.

JEnv

A third option is jEnv. The easiest approach for this installation is using brew:

brew install jenv

Once installed, you are back to the bash profile:

export PATH="$HOME/.jenv/bin:$PATH"
eval "$(jenv init -)"

Hopefully, this is a good direction for getting your development underway.