You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-functions/update-java-versions.md
+9-31Lines changed: 9 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,9 +33,11 @@ Before updating your Java version, make sure your function app is running on the
33
33
34
34
Use these steps to determine your Functions runtime version:
35
35
36
-
1. In the [Azure portal](https://portal.azure.com), locate your function app and select**Configuration** on the left-hand side under **Settings**.
36
+
1. In the [Azure portal](https://portal.azure.com), locate your function app and select**Configuration** on the left-hand side under **Settings**.
37
37
38
-
1. Select the **Function runtime settings** tab and see if your function app is running on version 4.x of the Functions runtime (`~4`).
38
+
1. Select the **Function runtime settings** tab and check the **Runtime version** value to see if your function app is running on version 4.x of the Functions runtime (`~4`).
39
+
40
+
:::image type="content" source="media/update-java-versions/update-functions-version-portal.png" alt-text="Screenshot of how to view the Functions runtime version for your app in the Azure portal":::
39
41
40
42
### [Azure CLI](#tab/azure-cli)
41
43
@@ -44,21 +46,11 @@ Use this [`az functionapp config appsettings list`](/cli/azure/functionapp/confi
44
46
```azurecli
45
47
az functionapp config appsettings list --name "<FUNCTION_APP_NAME>" --resource-group "<RESOURCE_GROUP_NAME>"
46
48
```
47
-
The `FUNCTIONS_EXTENSION_VERSION` setting dictates the runtime version. A value of `~4` means that your function app is already running on the latest minor version of the latest major version (4.x).
48
-
49
-
### [Azure PowerShell](#tab/azure-powershell)
50
-
51
-
The [`Get-AzFunctionAppSetting`](/powershell/module/az.functions/get-azfunctionappsetting) cmdlet returns the existing application settings, as in the following example:
The `FUNCTIONS_EXTENSION_VERSION` setting dictates the runtime version. A value of `~4` means that your function app is already running on the latest minor version of the latest major version (4.x).
49
+
The `FUNCTIONS_EXTENSION_VERSION` setting sets the runtime version. A value of `~4` means that your function app is already running on the latest minor version of the latest major version (4.x).
58
50
59
51
---
60
52
61
-
If you need to first update your function app to version 4.x, see [Migrate apps from Azure Functions version 3.x to version 4.x](./migrate-version-3-version-4.md).
53
+
If you need to first update your function app to version 4.x, see [Migrate apps from Azure Functions version 3.x to version 4.x](./migrate-version-3-version-4.md). You should follow the instructions in this article rather than just manually changing the `FUNCTIONS_EXTENSION_VERSION` setting.
62
54
63
55
## update your Java function app
64
56
:::zone pivot="platform-windows"
@@ -78,8 +70,8 @@ Use the following steps to update the Java version:
78
70
1. In the [Azure portal](https://portal.azure.com), locate your function app and select **Configuration** on the left-hand side.
79
71
80
72
1. In the **General settings** tab, update the **Java version** to `Java 17`.
81
-
1.
82
-
1.
73
+
74
+
:::image type="content" source="media/update-java-versions/update-java-version-portal.png" alt-text="Screenshot of how to set the desired Java version for a function app in the Azure portal":::
83
75
84
76
1. When notified about a restart, select **Continue**, and then **Save**.
85
77
@@ -88,7 +80,7 @@ Use the following steps to update the Java version:
88
80
You can use the Azure CLI to update the Java version for any hosting plan.
89
81
90
82
:::zone pivot="platform-windows"
91
-
Use this[`az functionapp config appsettings set`](/cli/azure/functionapp/config/appsettings#az-functionapp-config-appsettings-set)command to update the `java-version` setting to `17`:
83
+
Run the[`az functionapp config set`](/cli/azure/functionapp/config#az-functionapp-config-set)command to update the Java version site setting to `17`:
92
84
93
85
```azurecli
94
86
az functionapp config set --java-version "17" --name "<APP_NAME>" --resource-group "<RESOURCE_GROUP>"
@@ -104,20 +96,6 @@ az functionapp config set --linux-fx-version "java|17" --name "<APP_NAME>" --res
104
96
105
97
In this example, replace `<APP_NAME>` and `<RESOURCE_GROUP>` with the name of your function app and resource group, respectively.
106
98
107
-
### [Azure PowerShell](#tab/azure-powershell)
108
-
:::zone pivot="platform-windows"
109
-
Use the [`Update-AzFunctionAppSetting`](/powershell/module/az.functions/update-azfunctionappsetting) cmdlet to update the `java-version` setting to `17`:
In this example, replace `<APP_NAME>` and `<RESOURCE_GROUP>` with the name of your function app and resource group, respectively.
116
-
:::zone-end
117
-
:::zone pivot="platform-linux"
118
-
You can't use PowerShell to update the Java version on Linux. Use the Azure CLI instead.
119
-
:::zone-end
120
-
121
99
---
122
100
123
101
Your function app restarts after you update the Java version. To learn more about Functions support for Java, see [Language runtime support policy](language-support-policy.md).
0 commit comments