View your minor & patch version on App Service Linux Java Apps in a few easy steps.
Currently, viewing your Java or Java WebServer version on Linux is typically a two-step process involving first creating a remote connection, and then connecting to the remote connection to view your web app's info. Note that these steps do NOT work on App Service Windows applications, this applies only to App Service Linux.
Viewing your minor and patch version on App Service Linux for Java applications is possible by first setting up a remote connection to your Linux webapp by running the following command:
az webapp create-remote-connection -g {RESOURCE_GROUP} -n {WEBAPP_NAME}
This will result in something like this:
After creating the remote connection, we can connect to the webapp and view the info we’re looking for. Using another terminal window, to connect to our remote connection run the following command:
ssh root@127.0.0.1 -m hmac-sha1 -p {PORT_NUMBER}
After entering the password shown in the previous step, we will now have shell access to the web app. Now we can view our Java and webserver version.
To view Java version:
java -version
To view Tomcat version:
sh /usr/local/tomcat/version.sh
If your Tomcat Webserver is in a different location, we can locate it by running:
find / -name "version.sh"
To connect and view Java version with one command:
ssh root@127.0.0.1 -m hmac-sha1 -p {PORT_NUMBER} /usr/lib/jdk/bin/java -version
To connect and view Tomcat version with one command:
ssh root@127.0.0.1 -m hmac-sha1 -p {PORT_NUMBER} sh /usr/local/tomcat/version.sh
Published Jan 14, 2025
Version 1.0denverbrittain
Microsoft
Joined June 23, 2022
Apps on Azure Blog
Follow this blog board to get notified when there's new activity