Can't create a function app by vscode (Java runtime)

Uriya Stavi 1 Reputation point
2022-11-30T08:02:41.567+00:00

i have installed all the extensions. then i tried to create a function i got the next error: "Failed to find "maven", please ensure that the maven bin directory is in your system path."

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,909 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. MughundhanRaveendran-MSFT 12,506 Reputation points
    2022-12-01T08:03:23.97+00:00

    Hi @Uriya Stavi ,

    The JAVA_HOME environment variable must be set to the install location of the correct version of the JDK. Also to make sure the environment variables get refreshed, please close all the VS code windows and restart.

    https://learn.microsoft.com/en-us/azure/azure-functions/create-first-function-cli-java?tabs=bash%2Cazure-cli%2Cbrowser#configure-your-local-environment

    Similar issue : https://github.com/microsoft/vscode-azurefunctions/issues/3025

    Feel free to reach out to me if you have any questions or concerns.

    0 comments No comments

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.