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
Unless you specify a Java version for your deployment, the Maven archetype defaults to Java 8 during deployment to Azure.
158
158
159
159
### Specify the deployment version
160
160
161
-
You can control the version of Java targeted by the Maven archetype by using the `-DjavaVersion` parameter. The value of this parameter can be either `8`or `11`.
161
+
You can control the version of Java targeted by the Maven archetype by using the `-DjavaVersion` parameter. The value of this parameter can be either `8`, `11`, `17`or `21`.
162
162
163
163
The Maven archetype generates a pom.xml that targets the specified Java version. The following elements in pom.xml indicate the Java version to use:
164
164
165
-
| Element | Java 8 value | Java 11 value | Java 17 value | Description |
166
-
| ---- | ---- | ---- | ---- | --- |
167
-
|**`Java.version`**| 1.8 | 11 | 17 | Version of Java used by the maven-compiler-plugin. |
168
-
|**`JavaVersion`**| 8 | 11 | 17 | Java version hosted by the function app in Azure. |
165
+
| Element | Java 8 value | Java 11 value | Java 17 value |Java 21 value (Preview, Linux) |Description |
166
+
| ---- | ---- | ---- | ---- | ---- | ---|
167
+
|**`Java.version`**| 1.8 | 11 | 17 |21 |Version of Java used by the maven-compiler-plugin. |
168
+
|**`JavaVersion`**| 8 | 11 | 17 |21 |Java version hosted by the function app in Azure. |
169
169
170
170
The following examples show the settings for Java 8 in the relevant sections of the pom.xml file:
171
171
@@ -192,7 +192,7 @@ The following example shows the operating system setting in the `runtime` sectio
192
192
193
193
## JDK runtime availability and support
194
194
195
-
Microsoft and [Adoptium](https://adoptium.net/) builds of OpenJDK are provided and supported on Functions for Java 8 (Adoptium), 11 (MSFT) and 17(MSFT). These binaries are provided as a no-cost, multi-platform, production-ready distribution of the OpenJDK for Azure. They contain all the components for building and running Java SE applications.
195
+
Microsoft and [Adoptium](https://adoptium.net/) builds of OpenJDK are provided and supported on Functions for Java 8 (Adoptium), Java 11, 17 and 21 (MSFT). These binaries are provided as a no-cost, multi-platform, production-ready distribution of the OpenJDK for Azure. They contain all the components for building and running Java SE applications.
196
196
197
197
For local development or testing, you can download the [Microsoft build of OpenJDK](/java/openjdk/download) or [Adoptium Temurin](https://adoptium.net/?variant=openjdk8&jvmVariant=hotspot) binaries for free. [Azure support](https://azure.microsoft.com/support/) for issues with the JDKs and function apps is available with a [qualified support plan](https://azure.microsoft.com/support/plans/).
0 commit comments