Azure Functions with Java and Eclipse

★★★ Live配信告知 ★★★ぜひお申込みください!
◆◇世界一わかりみの深いクラウドネイティブ on Azure◆◇
8/4(木) 19:00~ 第17回:コンテナをサーバーレスでラクラク実行 〜 Azure Container InstancesとDocker CLIで実現 〜 今回は、コンテナをサーバーレスで実行するテクノロジとDocker CLIとの連携を紹介します。
◆◇PS Live◆◇
8/5(金) 12:00~ 第18回:アウトプットはイイぞ 〜サイオステクノロジーLT大会〜 エンジニア初級者向けから、個人ネタまで、エンジニア脳を体感できるプログラムです。

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.


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

ご覧いただきありがとうございます! この投稿はお役に立ちましたか?

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


Be the first to comment

Leave a Reply

Your email address will not be published.