Skip to content

Commit 3fdce17

Browse files
authored
Merge pull request #182523 from cephalin/java11
Java 11 upgrade
2 parents fcef7aa + 208090a commit 3fdce17

File tree

3 files changed

+75
-17
lines changed

3 files changed

+75
-17
lines changed
23.7 KB
Loading
33.8 KB
Loading

articles/app-service/quickstart-java.md

Lines changed: 75 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ author: jasonfreeberg
66
ms.assetid: 582bb3c2-164b-42f5-b081-95bfcb7a502a
77
ms.devlang: Java
88
ms.topic: quickstart
9-
ms.date: 08/01/2020
9+
ms.date: 12/10/2021
1010
ms.author: jafreebe
1111
ms.custom: mvc, seo-java-july2019, seo-java-august2019, seo-java-september2019, mode-other
1212
zone_pivot_groups: app-service-platform-windows-linux
@@ -20,14 +20,35 @@ adobe-target-content: ./quickstart-java-uiex
2020

2121
[Azure App Service](overview.md) provides a highly scalable, self-patching web hosting service. This quickstart shows how to use the [Azure CLI](/cli/azure/get-started-with-azure-cli) with the [Azure Web App Plugin for Maven](https://github.com/Microsoft/azure-maven-plugins/tree/develop/azure-webapp-maven-plugin) to deploy a .jar file, or .war file. Use the tabs to switch between Java SE and Tomcat instructions.
2222

23+
# [Java SE](#tab/javase)
24+
25+
![Spring app greetings in Azure App Service](./media/quickstart-java/java-se-greetings-in-browser.png)
26+
27+
# [Tomcat](#tab/tomcat)
28+
29+
![Maven Hello World web app running in Azure App Service](./media/quickstart-java/java-hello-world-in-browser-azure-app-service.png)
30+
31+
# [JBoss EAP](#tab/jbosseap)
32+
33+
::: zone pivot="platform-windows"
34+
35+
JBoss EAP is only available on the Linux version of App Service. Select the **Linux** button at the top of this article to view the quickstart instructions for JBoss EAP.
36+
37+
::: zone-end
38+
39+
::: zone pivot="platform-linux"
40+
![Maven Hello World web app running in Azure App Service](./media/quickstart-java/jboss-sample-in-app-service.png)
41+
42+
::: zone-end
43+
44+
-----
45+
2346
If Maven isn't your preferred development tool, check out our similar tutorials for Java developers:
2447
+ [Gradle](./configure-language-java.md?pivots=platform-linux#gradle)
2548
+ [IntelliJ IDEA](/azure/developer/java/toolkit-for-intellij/create-hello-world-web-app)
2649
+ [Eclipse](/azure/developer/java/toolkit-for-eclipse/create-hello-world-web-app)
2750
+ [Visual Studio Code](https://code.visualstudio.com/docs/java/java-webapp)
2851

29-
![Sample app running in Azure App Service](./media/quickstart-java/java-hello-world-in-browser-azure-app-service.png)
30-
3152
[!INCLUDE [quickstarts-free-trial-note](../../includes/quickstarts-free-trial-note.md)]
3253

3354
[!INCLUDE [cloud-shell-try-it.md](../../includes/cloud-shell-try-it.md)]
@@ -66,7 +87,7 @@ cd helloworld
6687

6788
::: zone pivot="platform-windows"
6889

69-
JBoss EAP is only available on the Linux version of App Service. Please select the **Linux** button at the top of this article to view the quickstart instructions for JBoss EAP.
90+
JBoss EAP is only available on the Linux version of App Service. Select the **Linux** button at the top of this article to view the quickstart instructions for JBoss EAP.
7091

7192
::: zone-end
7293
::: zone pivot="platform-linux"
@@ -104,7 +125,7 @@ mvn com.microsoft.azure:azure-webapp-maven-plugin:2.2.3:config
104125
1. If prompted with **Subscription** option, select the proper `Subscription` by entering the number printed at the line start.
105126
2. When prompted with **Web App** option, select the default option, `<create>`, by pressing enter.
106127
3. When prompted with **OS** option, select **Windows** by entering `1`.
107-
4. When prompted with **javaVersion** option, select **Java 8** by entering `1`.
128+
4. When prompted with **javaVersion** option, select **Java 11** by entering `2`.
108129
5. When prompted with **Pricing Tier** option, select **P1v2** by entering `10`.
109130
6. Finally, press enter on the last prompt to confirm your selections.
110131

@@ -118,7 +139,7 @@ mvn com.microsoft.azure:azure-webapp-maven-plugin:2.2.3:config
118139
Region : centralus
119140
PricingTier : P1v2
120141
OS : Windows
121-
Java : Java 8
142+
Java : Java 11
122143
Web server stack : Java SE
123144
Deploy to slot : false
124145
Confirm (Y/N)? : Y
@@ -136,7 +157,7 @@ mvn com.microsoft.azure:azure-webapp-maven-plugin:2.2.3:config
136157
1. If prompted with **Subscription** option, select the proper `Subscription` by entering the number printed at the line start.
137158
2. When prompted with **Web App** option, select the default option, `<create>`, by pressing enter.
138159
3. When prompted with **OS** option, select **Windows** by entering `1`.
139-
4. When prompted with **javaVersion** option, select **Java 8** by entering `1`.
160+
4. When prompted with **javaVersion** option, select **Java 11** by entering `2`.
140161
5. When prompted with **webContainer** option, select **Tomcat 8.5** by entering `1`.
141162
6. When prompted with **Pricing Tier** option, select **P1v2** by entering `10`.
142163
7. Finally, press enter on the last prompt to confirm your selections.
@@ -151,7 +172,7 @@ mvn com.microsoft.azure:azure-webapp-maven-plugin:2.2.3:config
151172
Region : centralus
152173
PricingTier : P1v2
153174
OS : Windows
154-
Java : Java 8
175+
Java : Java 11
155176
Web server stack : Tomcat 8.5
156177
Deploy to slot : false
157178
Confirm (Y/N)? : Y
@@ -166,7 +187,7 @@ mvn com.microsoft.azure:azure-webapp-maven-plugin:2.2.3:config
166187
167188
# [JBoss EAP](#tab/jbosseap)
168189
169-
JBoss EAP is only available on the Linux version of App Service. Please select the **Linux** button at the top of this article to view the quickstart instructions for JBoss EAP.
190+
JBoss EAP is only available on the Linux version of App Service. Select the **Linux** button at the top of this article to view the quickstart instructions for JBoss EAP.
170191
171192
---
172193
@@ -178,7 +199,7 @@ JBoss EAP is only available on the Linux version of App Service. Please select t
178199
1. When prompted with **Subscription** option, select the proper `Subscription` by entering the number printed at the line start.
179200
1. When prompted with **Web App** option, select the default option, `<create>`, by pressing enter.
180201
1. When prompted with **OS** option, select **Linux** by pressing enter.
181-
2. When prompted with **javaVersion** option, select **Java 8** by entering `1`.
202+
2. When prompted with **javaVersion** option, select **Java 11** by entering `2`.
182203
3. When prompted with **Pricing Tier** option, select **P1v2** by entering `9`.
183204
4. Finally, press enter on the last prompt to confirm your selections.
184205
@@ -207,7 +228,7 @@ JBoss EAP is only available on the Linux version of App Service. Please select t
207228
1. When prompted with **Subscription** option, select the proper `Subscription` by entering the number printed at the line start.
208229
1. When prompted with **Web App** option, select the default option, `<create>`, by pressing enter.
209230
1. When prompted with **OS** option, select **Linux** by pressing enter.
210-
1. When prompted with **javaVersion** option, select **Java 8** by entering `1`.
231+
1. When prompted with **javaVersion** option, select **Java 11** by entering `2`.
211232
1. When prompted with **webcontainer** option, select **Tomcat 8.5** by entering `3`.
212233
1. When prompted with **Pricing Tier** option, select **P1v2** by entering `9`.
213234
1. Finally, press enter on the last prompt to confirm your selections.
@@ -237,7 +258,7 @@ JBoss EAP is only available on the Linux version of App Service. Please select t
237258
1. If prompted with **Subscription** option, select the proper `Subscription` by entering the number printed at the line start.
238259
1. When prompted with **Web App** option, accept the default option `<create>` by pressing enter.
239260
1. When prompted with **OS** option, select **Linux** by pressing enter.
240-
1. When prompted with **javaVersion** option, select **Java 8** by entering `1`.
261+
1. When prompted with **javaVersion** option, select **Java 11** by entering `2`.
241262
1. When prompted with **webContainer** option, select **Jbosseap 7** by entering `1`
242263
1. When prompted with **pricingTier** option, select **P1v3** by entering `1`
243264
1. Finally, press enter on the last prompt to confirm your selections.
@@ -250,7 +271,7 @@ JBoss EAP is only available on the Linux version of App Service. Please select t
250271
Region : centralus
251272
PricingTier : P1v3
252273
OS : Linux
253-
Java : Java 8
274+
Java : Java 11
254275
Web server stack: Jbosseap 7
255276
Deploy to slot : false
256277
Confirm (Y/N) [Y]: y
@@ -289,20 +310,57 @@ Be careful about the values of `<appName>` and `<resourceGroup>` (`helloworld-15
289310
290311
With all the configuration ready in your pom file, you can deploy your Java app to Azure with one single command.
291312
313+
# [Java SE](#tab/javase)
292314
```azurecli-interactive
293315
mvn package azure-webapp:deploy
294316
```
317+
# [Tomcat](#tab/tomcat)
318+
```azurecli-interactive
319+
mvn package azure-webapp:deploy
320+
```
321+
# [JBoss EAP](#tab/jbosseap)
295322

296-
::: zone pivot="platform-linux"
323+
::: zone pivot="platform-windows"
324+
325+
JBoss EAP is only available on the Linux version of App Service. Select the **Linux** button at the top of this article to view the quickstart instructions for JBoss EAP.
297326

298-
> [!NOTE]
299-
> For JBoss EAP, run `mvn package azure-webapp:deploy -DskipTests` to disable testing, as it requires Wildfly to be installed locally.
327+
::: zone-end
300328

329+
::: zone pivot="platform-linux"
330+
331+
```azurecli-interactive
332+
# Disable testing, as it requires Wildfly to be installed locally.
333+
mvn package azure-webapp:deploy -DskipTests
334+
```
301335
::: zone-end
302336

337+
-----
338+
303339
Once deployment has completed, your application will be ready at `http://<appName>.azurewebsites.net/` (`http://helloworld-1590394316693.azurewebsites.net` in the demo). Open the url with your local web browser, you should see
304340

305-
![Sample app running in Azure App Service](./media/quickstart-java/java-hello-world-in-browser-azure-app-service.png)
341+
# [Java SE](#tab/javase)
342+
343+
![Spring app greetings in Azure App Service](./media/quickstart-java/java-se-greetings-in-browser.png)
344+
345+
# [Tomcat](#tab/tomcat)
346+
347+
![Maven Hello World web app running in Azure App Service](./media/quickstart-java/java-hello-world-in-browser-azure-app-service.png)
348+
349+
# [JBoss EAP](#tab/jbosseap)
350+
351+
::: zone pivot="platform-windows"
352+
353+
JBoss EAP is only available on the Linux version of App Service. Select the **Linux** button at the top of this article to view the quickstart instructions for JBoss EAP.
354+
355+
::: zone-end
356+
357+
::: zone pivot="platform-linux"
358+
359+
![Maven Hello World web app running in Azure App Service](./media/quickstart-java/jboss-sample-in-app-service.png)
360+
361+
::: zone-end
362+
363+
-----
306364

307365
**Congratulations!** You've deployed your first Java app to App Service.
308366

0 commit comments

Comments
 (0)