Expand my Community achievements bar.

SOLVED

set JDK 11 path in AEM 6.5

Avatar

Level 2

Iam setting up fresh install of AEM 6.5 in RHEL 8 servers. my question is where do i set the JDK path for the fresh install. I have JDK 8,11,17 on the server and JDK 11 being the default default. 

I have read about issues with JDK 11 and I don't want to run the quickstart.jar file, and the look in the logs figure out the issues and make changes to the sling.properties file. what i want to do is first unpack the jar and then go into the sling.properties file and set the properties and then run the start.bat file to start the installation.

now, my question is, if i unpack the quickstart.jar file and then want to set the JDK 11 path, where do i set it? is there a property in sling.properties file that i need to set? any help would be appreciated.

note : the server is clean slate. I installed JDK 8,11,17 myself. i was wondering if i have to set the JAVA_HOME path too? in which case where do i set the JAVA_HOME path? i have root access to the server. If the set the JAVA_HOME path, can i assume AEM automatically takes the JAVA_HOME?

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

See below tutorial to how to set Java home for user /all user on Linux https://www.java67.com/2016/06/how-to-set-javahome-and-path-in-linux.html?m=1

setting up a Java home helps you in running the application that requires Java and yes aem will automatically pick the JAVA_HOME variable value available for the user who is running the AEM

View solution in original post

5 Replies

Avatar

Correct answer by
Community Advisor

See below tutorial to how to set Java home for user /all user on Linux https://www.java67.com/2016/06/how-to-set-javahome-and-path-in-linux.html?m=1

setting up a Java home helps you in running the application that requires Java and yes aem will automatically pick the JAVA_HOME variable value available for the user who is running the AEM

Avatar

Level 2

@ASP_Corp 

** Edit the system environment variables: Please create a "JAVA_HOME" variable under System variables and set the JDK path for version 11, for example, C:\Program Files\Java\jdk-11.0.9.

** Edit the "Path" variable: Move "JAVA_HOME" to the top position.

AEM automatically uses the JDK 11 version when starting the AEM instance.

 

JDK_EnvironmentVariables.JPG

Avatar

Level 2

Thank you for the reply. mine is RHEL and yours looks like it is for windows. anyways this will be useful for those who are using windows.

Avatar

Level 2

just wanted to add. the link looks like setting JAVA In old Linux distros. for new OS like RHEL 8 or 9 this link will help. https://stackoverflow.com/questions/24641536/how-to-set-java-home-in-linux-for-all-users

Avatar

Community Advisor

Hi @ASP_Corp 

1.Download JDK 11.0.12 version. 

  1. 2. Setup the System Environment Variable. example: JAVA_HOME= C:\Program Files\Java\jdk11.0.12 
  2. Validate the version of java using command prompt 
    Java -version

Reddy3370_0-1703754815928.png