You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This guide contains detailed information to help you succeed developing Azure Functions using Java.
13
13
14
-
As a Java developer, if you're new to Azure Functions, please consider first reading one of the following articles:
14
+
As a Java developer, if you're new to Azure Functions, consider first reading one of the following articles:
15
15
16
16
| Getting started | Concepts| Scenarios/samples |
17
17
| -- | -- | -- |
18
-
| <ul><li>[Java function using Visual Studio Code](./create-first-function-vs-code-java.md)</li><li>[Java/Maven function with terminal/command prompt](./create-first-function-cli-java.md)</li><li>[Java function using Gradle](functions-create-first-java-gradle.md)</li><li>[Java function using Eclipse](functions-create-maven-eclipse.md)</li><li>[Java function using IntelliJ IDEA](functions-create-maven-intellij.md)</li></ul> | <ul><li>[Developer guide](functions-reference.md)</li><li>[Hosting options](functions-scale.md)</li><li>[Performance considerations](functions-best-practices.md)</li></ul> | <ul><li>[Java samples with different triggers](/samples/azure-samples/azure-functions-samples-java/azure-functions-java/)</li><li>[Event Hub trigger and Azure Cosmos DB output binding](/samples/azure-samples/java-functions-eventhub-cosmosdb/sample/)</li></ul> |
18
+
| <ul><li>[Java function using Visual Studio Code](./create-first-function-vs-code-java.md)</li><li>[Java/Maven function with terminal/command prompt](./create-first-function-cli-java.md)</li><li>[Java function using Gradle](functions-create-first-java-gradle.md)</li><li>[Java function using Eclipse](functions-create-maven-eclipse.md)</li><li>[Java function using IntelliJ IDEA](functions-create-maven-intellij.md)</li></ul> | <ul><li>[Developer guide](functions-reference.md)</li><li>[Hosting options](functions-scale.md)</li><li>[Performance considerations](functions-best-practices.md)</li></ul> | <ul><li>[Java samples with different triggers](/samples/azure-samples/azure-functions-samples-java/azure-functions-java/)</li><li>[Event Hubs trigger and Azure Cosmos DB output binding](/samples/azure-samples/java-functions-eventhub-cosmosdb/sample/)</li></ul> |
19
19
20
20
## Java function basics
21
21
22
-
A Java function is a `public` method, decorated with the annotation `@FunctionName`. This method defines the entry for a Java function, and must be unique in a particular package. The package can have multiple classes with multiple public methods annotated with `@FunctionName`. A single package is deployed to a function app in Azure. When running in Azure, the function app provides the deployment, execution, and management context for your individual Java functions.
22
+
A Java function is a `public` method, decorated with the annotation `@FunctionName`. This method defines the entry for a Java function, and must be unique in a particular package. The package can have multiple classes with multiple public methods annotated with `@FunctionName`. A single package is deployed to a function app in Azure. In Azure, the function app provides the deployment, execution, and management context for your individual Java functions.
23
23
24
24
## Programming model
25
25
@@ -37,9 +37,9 @@ The following developer environments have Azure Functions tooling that lets you
37
37
+[Eclipse](functions-create-maven-eclipse.md)
38
38
+[IntelliJ](functions-create-maven-intellij.md)
39
39
40
-
The article links above show you how to create your first functions using your IDE of choice.
40
+
These articles show you how to create your first functions using your IDE of choice.
41
41
42
-
### Project Scaffolding
42
+
### Project scaffolding
43
43
44
44
If you prefer command line development from the Terminal, the simplest way to scaffold Java-based function projects is to use `Apache Maven` archetypes. The Java Maven archetype for Azure Functions is published under the following _groupId_:_artifactId_: [com.microsoft.azure:azure-functions-archetype](https://search.maven.org/artifact/com.microsoft.azure/azure-functions-archetype/).
45
45
@@ -67,7 +67,7 @@ To get started using this archetype, see the [Java quickstart](./create-first-fu
67
67
68
68
## Folder structure
69
69
70
-
Here is the folder structure of an Azure Functions Java project:
70
+
Here's the folder structure of an Azure Functions Java project:
71
71
72
72
```
73
73
FunctionsProject
@@ -116,7 +116,7 @@ public class Function {
116
116
}
117
117
```
118
118
119
-
Here is the generated corresponding `function.json` by the [azure-functions-maven-plugin](https://mvnrepository.com/artifact/com.microsoft.azure/azure-functions-maven-plugin):
119
+
Here's the generated corresponding `function.json` by the [azure-functions-maven-plugin](https://mvnrepository.com/artifact/com.microsoft.azure/azure-functions-maven-plugin):
120
120
121
121
```json
122
122
{
@@ -142,7 +142,7 @@ Here is the generated corresponding `function.json` by the [azure-functions-mave
142
142
143
143
## Java versions
144
144
145
-
The version of Java used when creating the function app on which functions runs in Azure is specified in the pom.xml file. The Maven archetype currently generates a pom.xml for Java 8, which you can change before publishing. The Java version in pom.xml should match the version on which you have locally developed and tested your app.
145
+
The version of Java on which your app runs in Azure is specified in the pom.xml file. The Maven archetype currently generates a pom.xml for Java 8, which you can change before publishing. The Java version in pom.xml should match the version on which you've locally developed and tested your app.
146
146
147
147
### Supported versions
148
148
@@ -192,11 +192,11 @@ The following example shows the operating system setting in the `runtime` sectio
192
192
193
193
## JDK runtime availability and support
194
194
195
-
Microsoft and [Adoptium](https://adoptium.net/) builds of OpenJDK are provided and supported on Functions for Java 8 (Adoptium), 11 (MSFT) and 17(MSFT). These binaries are provided as a no-cost, multi-platform, production-ready distribution of the OpenJDK for Azure. They contain all the components for building and runnning Java SE applications.
195
+
Microsoft and [Adoptium](https://adoptium.net/) builds of OpenJDK are provided and supported on Functions for Java 8 (Adoptium), 11 (MSFT) and 17(MSFT). These binaries are provided as a no-cost, multi-platform, production-ready distribution of the OpenJDK for Azure. They contain all the components for building and running Java SE applications.
196
196
197
197
For local development or testing, you can download the [Microsoft build of OpenJDK](/java/openjdk/download) or [Adoptium Temurin](https://adoptium.net/?variant=openjdk8&jvmVariant=hotspot) binaries for free. [Azure support](https://azure.microsoft.com/support/) for issues with the JDKs and function apps is available with a [qualified support plan](https://azure.microsoft.com/support/plans/).
198
198
199
-
If you would like to continue using the Zulu for Azure binaries on your Function app, please [configure your app accordingly](https://github.com/Azure/azure-functions-java-worker/wiki/Customize-JVM-to-use-Zulu). You can continue to use the Azul binaries for your site, but any security patches or improvements will only be available in new versions of the OpenJDK, so we recommend that you eventually remove this configuration so that your Function apps use the latest available version of Java.
199
+
If you would like to continue using the Zulu for Azure binaries on your Function app, [configure your app accordingly](https://github.com/Azure/azure-functions-java-worker/wiki/Customize-JVM-to-use-Zulu). You can continue to use the Azul binaries for your site. However, any security patches or improvements are only available in new versions of the OpenJDK. Because of this, you should eventually remove this configuration so that your apps use the latest available version of Java.
200
200
201
201
## Customize JVM
202
202
@@ -208,7 +208,7 @@ Functions lets you customize the Java virtual machine (JVM) used to run your Jav
208
208
*`-Djava.net.preferIPv4Stack=true`
209
209
*`-jar`
210
210
211
-
You can provide additional arguments to the JVM by using one of the following application settings, depending on the plan type:
211
+
You can provide other arguments to the JVM by using one of the following application settings, depending on the plan type:
212
212
213
213
| Plan type | Setting name | Comment |
214
214
| --- | --- |
@@ -354,7 +354,7 @@ To receive a batch of inputs, you can bind to `String[]`, `POJO[]`, `List<String
354
354
355
355
```
356
356
357
-
This function gets triggered whenever there is new data in the configured event hub. Because the `cardinality` is set to `MANY`, the function receives a batch of messages from the event hub. `EventData` from event hub gets converted to `TestEventData` for the function execution.
357
+
This function gets triggered whenever there's new data in the configured event hub. Because the `cardinality` is set to `MANY`, the function receives a batch of messages from the event hub. `EventData` from event hub gets converted to `TestEventData` for the function execution.
358
358
359
359
### Output binding example
360
360
@@ -415,7 +415,7 @@ You invoke this function on an `HttpRequest` object. It writes multiple values t
415
415
416
416
## HttpRequestMessage and HttpResponseMessage
417
417
418
-
These are defined in `azure-functions-java-library`. They are helper types to work with HttpTrigger functions.
418
+
These are defined in `azure-functions-java-library`. They're helper types to work with HttpTrigger functions.
0 commit comments