01 Run webapp list-runtimes command (Windows/macOS/Linux) using custom query filters to list the Java versions currently supported by Microsoft Azure App Service:
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
az webapp list-runtimes | grep java
02 The command output should return the supported versions of the Java software:
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
"java|1.7|Tomcat|7.0",
"java|1.7|Tomcat|8.0",
"java|1.7|Tomcat|8.5",
"java|1.7|Tomcat|9.0",
"java|1.7|Jetty|9.1",
"java|1.7|Jetty|9.3",
"java|1.8|Tomcat|7.0",
"java|1.8|Tomcat|8.0",
"java|1.8|Tomcat|8.5",
"java|1.8|Tomcat|9.0",
"java|1.8|Jetty|9.1",
"java|1.8|Jetty|9.3",
"java|11|Tomcat|7.0",
"java|11|Tomcat|8.0",
"java|11|Tomcat|8.5",
"java|11|Tomcat|9.0",
"java|11|Jetty|9.1",
"java|11|Jetty|9.3"
03 Run webapp list command (Windows/macOS/Linux) using custom query filters to list the IDs of all App Service web applications launched in the current Azure subscription:
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
az webapp list
--query '[*].id'
04 The command output should return the requested Azure App Service application IDs:
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
[
"/subscriptions/1234abcd-1234-abcd-1234-abcd1234abcd/resourceGroups/cloud-shell-storage-westeurope/providers/Microsoft.Web/sites/cc-tomcat-webapp",
"/subscriptions/1234abcd-1234-abcd-1234-abcd1234abcd/resourceGroups/cloud-shell-storage-westeurope/providers/Microsoft.Web/sites/cc-mobile-webapp",
"/subscriptions/1234abcd-1234-abcd-1234-abcd1234abcd/resourceGroups/cloud-shell-storage-westeurope/providers/Microsoft.Web/sites/cc-frontend-webapp"
]
05 Run webapp config show command (Windows/macOS/Linux) using the ID of the application that you want to examine as identifier parameter and custom query filters to describe the Java software version configured for the selected Azure App Service web application:
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
az webapp config show
--ids "/subscriptions/1234abcd-1234-abcd-1234-abcd1234abcd/resourceGroups/cloud-shell-storage-westeurope/providers/Microsoft.Web/sites/cc-tomcat-webapp"
--query '{"javaVersion":javaVersion}'
06 The command output should return the Java software version currently in use:
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
{
"javaVersion": "1.8"
}
If the value returned by the
webapp config show command output for
"javaVersion" configuration attribute is null or an empty string (i.e. ""), the selected application is not using a Java software stack. Otherwise, check the returned attribute value and compare it with each version returned at step no. 2. If
"javaVersion" value is different than the latest version of Java returned at step no. 2, the selected Microsoft Azure App Service web application is not using the latest version of Java software.
07 Repeat steps no. 3 – 6 for each Azure App Service web application available within the current subscription.
08 Repeat steps no. 3 – 7 for each subscription created in your Microsoft Azure cloud account.