Skip to content

Customize JRE used by Azure Functions

Ahmed El Sayed edited this page Nov 16, 2021 · 10 revisions

For Windows plan:

  • Open Kudu: https://docs.microsoft.com/en-us/azure/azure-functions/functions-how-to-use-azure-function-app-settings#kudu
  • Find the JRE you would like to use, which can be located at D:\Program Files\Java\
  • Copy your JRE to a folder in d:\home. For example D:\home\MyJre
  • Add AppSetting Key languageWorkers:java:defaultExecutablePath with value set to full path to your java.exe, for example d:\home\MyJre\bin\java.exe
  • If your app is using consumption plan, you also need add following appsetting. Note: This will increase cold starts for java functions
    • App setting key WEBSITE_USE_PLACEHOLDER with value set to 0

For Linux plan:

Clone this wiki locally