1 Answer
- Newest
- Most votes
- Most comments
2
Hello,
The easiest way would be using "--runtime-configuration" in Create Application to pass the spark-default as mentioned in the link to add the below properties for the whole application.
{
"classification": "spark-defaults",
"properties": {
"spark.emr-serverless.driverEnv.JAVA_HOME" : "/usr/lib/jvm/java-17-amazon-corretto.x86_64/",
"spark.executorEnv.JAVA_HOME": "/usr/lib/jvm/java-17-amazon-corretto.x86_64/"
}
}
Unfortunately, there is no simple option like the UI as the GUI translates the same configuration on client end when the dropdown is selected for different Java version on UI.
Relevant content
- asked 3 years ago
- asked 4 years ago
- asked 3 years ago

Thanks that works. Can I use Java 11 the same way?
Unfortunately, Java 11 is not shipped with all the images in EMR Serverless. I would recommend you to verify if Java11 is available on a said version and if yes then you can use the same way else you have to use (custom images)[https://docs.aws.amazon.com/emr/latest/EMR-Serverless-UserGuide/application-custom-image.html] where java 11 is installed.