How to run java jar on azure function app

Anil Yadav 20 Reputation points
2023-08-09T10:06:15.1433333+00:00

We have a executable Java Jar file which we want to deploy and run on Azure function app. could you please help me to achieve this?

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,909 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,931 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Hugo Barona 416 Reputation points MVP
    2023-08-09T10:39:15.65+00:00

    Hi Anil,

    You can deploy and run a Java JAR file on Azure Functions using Azure's support for custom Docker containers. Here's a general outline of the steps you would need to follow:

    1. Prepare Your Java Application: Ensure your Java application is packaged as a JAR file and includes all necessary dependencies. Test it locally to make sure it works as expected.
    2. Create a Docker Container: Azure Functions supports running custom Docker containers. You'll need to create a Docker container that includes your Java application and its dependencies. You can use a Dockerfile for this purpose.

    Follows a great article on MS Learn that helps you work with this:

    https://learn.microsoft.com/en-us/azure/azure-functions/functions-how-to-custom-container

    If you find the comment helpful, please mark it as an accepted answer.

    Thanks and have a great day.

    0 comments No comments

  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.