Azure Functions with Java and Eclipse

◆ エンジニア業務環境アンケート結果 ◆
⇒ アンケート結果はこちらから

Azure Functions with Java is generally available.In this post, I’ll show you how to create Azure Functions with Java and Eclipse.This post assumes that you use Mac OS.Of course, you can with Windows.

 At first, you need to install .NET Core. See the following links for details.

Next, you need to install Azure Functions Core Tools.Execute the following command in Terminal of Mac OS.

# brew tap azure/functions
# brew install azure-functions-core-tools

In Eclipse, select the File menu, then select Project.Screen Shot 2019-02-28 at 20.00.40


Open the Maven Project folder and select Maven Project, then select Next.

Screen Shot 2019-02-28 at 20.01.32


Select Next.

Screen Shot 2019-02-28 at 21.23.44


Click “Add Archetype…”.

Screen Shot 2019-02-28 at 21.24.00


Add the entries for the azure-functions-archetype.

  • Archetype Group ID:
  • Archetype Artifact ID: azure-functions-archetype
  • Version: Use latest version from the central repository

Screen Shot 2019-02-28 at 21.24.53


Select Next.

Screen Shot 2019-02-28 at 21.25.07


Enter the value based on the Maven Rules in the “Group Id” and “Artifact Id” fields and click “Finish”.

Screen Shot 2019-02-28 at 21.26.55


Maven creates the project files in a new folder with a name of artifactId. The follwing code is generated.This code is a simple HTTP triggered function that echoes the body of the triggering HTTP request.

Screen Shot 2019-02-28 at 22.28.36


Right-click on the generated project, then choose Run As and Maven build.

Screen Shot 2019-02-28 at 21.31.52


In the Edit Configuration dialog, Enter package in the Goals and Name fields, then select Run.

Screen Shot 2019-02-28 at 22.30.40


Once the build is complete, create another Run configuration to execute Azure Functions built previously.

Screen Shot 2019-02-28 at 22.37.19


In the Edit Configuration dialog, Enter “azure-functions:run” in the Goals and Name fields, then select Run.

Screen Shot 2019-02-28 at 22.36.15


The following messages get displayed in Console if execution is successful.

Http Functions:
    HttpTrigger-Java: [GET,POST] https://localhost:7071/api/HttpTrigger-Java

Add a query parameter “name” to the end of the URL as above and access the following URL.


You will see “Hello, noriyuki” on your Web Browser.

About 武井 宜行 257 Articles
Microsoft MVP for Azure🌟「最新の技術を楽しくわかりやすく」をモットーにブログで情報を発信🎤得意分野はAzureによるクラウドネイティブな開発(Javaなど)💻「世界一わかりみの深いクラウドネイティブ on Azure」の動画を配信中📹
ご覧いただきありがとうございます! この投稿はお役に立ちましたか?

役に立った 役に立たなかった



>> 雑誌等の執筆依頼を受付しております。

Be the first to comment

Leave a Reply

Your email address will not be published.


質問はこちら 閉じる