Skip to content

Commit 9c4601e

Browse files
committed
Fix Kaibo's additions
1 parent cdcfd14 commit 9c4601e

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

articles/azure-functions/functions-reference-java.md

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -208,37 +208,36 @@ Functions lets you customize the Java virtual machine (JVM) used to run your Jav
208208
* `-Djava.net.preferIPv4Stack=true`
209209
* `-jar`
210210

211-
You can provide additional arguments in an app setting. You can add app settings to your function app deployed to Azure in the Azure portal or the Azure CLI.
212-
* In Windows/Linux dedicated and premium plan, use app setting named `JAVA_OPTS`
213-
* In the Windows Consumption plan, use app setting named `languageWorkers:java:arguments`.
214-
* In the Linux Consumption plan, use app setting named `languageWorkers__java__arguments`.
211+
You can provide additional arguments to the JVM by using one of the following application settings, depending on the plan type:
215212

216-
> [!IMPORTANT]
217-
> In the Consumption plan, this setting does increase the cold start times for Java functions.
213+
| Plan type | Setting name | Comment |
214+
| --- | --- |
215+
| [Consumption plan](./consumption-plan.md) | `languageWorkers__java__arguments` | This setting does increase the cold start times for Java functions running in a Consumption plan. |
216+
| [Premium plan](./functions-premium-plan.md)<br/>[Dedicated plan](./dedicated-plan.md) | `JAVA_OPTS` | |
217+
218+
The following examples show you how to add these settings. To learn more about working with application settings, see the [Work with application settings](./functions-how-to-use-azure-function-app-settings.md#settings) section.
218219

219220
### Azure portal
220221

221-
In the [Azure portal](https://portal.azure.com), use the [Application Settings tab](functions-how-to-use-azure-function-app-settings.md#settings) to add the `JAVA_OPTS` setting.
222+
In the [Azure portal](https://portal.azure.com), use the [Application Settings tab](functions-how-to-use-azure-function-app-settings.md#settings) to add either the `languageWorkers__java__arguments` or the `JAVA_OPTS` setting.
222223

223224
### Azure CLI
224225

225-
You can use the [az functionapp config appsettings set](/cli/azure/functionapp/config/appsettings) command to set `JAVA_OPTS`, as in the following example:
226+
You can use the [az functionapp config appsettings set](/cli/azure/functionapp/config/appsettings) command to add these settings, as shown in the following example for the `-Djava.awt.headless=true` option:
226227

227228
# [Consumption plan](#tab/consumption/bash)
228229

229230
```azurecli-interactive
230231
az functionapp config appsettings set \
231-
--settings "JAVA_OPTS=-Djava.awt.headless=true" \
232-
"WEBSITE_USE_PLACEHOLDER=0" \
232+
--settings "languageWorkers__java__arguments=-Djava.awt.headless=true" \
233233
--name <APP_NAME> --resource-group <RESOURCE_GROUP>
234234
```
235235

236236
# [Consumption plan](#tab/consumption/cmd)
237237

238238
```azurecli-interactive
239239
az functionapp config appsettings set ^
240-
--settings "JAVA_OPTS=-Djava.awt.headless=true" ^
241-
"WEBSITE_USE_PLACEHOLDER=0" ^
240+
--settings "languageWorkers__java__arguments=-Djava.awt.headless=true" ^
242241
--name <APP_NAME> --resource-group <RESOURCE_GROUP>
243242
```
244243

0 commit comments

Comments
 (0)