|
| 1 | +# Azure Functions & Java 8 |
| 2 | + |
| 3 | +## Summary |
| 4 | + |
| 5 | +*Develop Azure Functions in Java. Includes JDK 8, Maven, XML tools, the Azure Functions SDK, and related extensions and dependencies.* |
| 6 | + |
| 7 | +| Metadata | Value | |
| 8 | +|----------|-------| |
| 9 | +| *Contributors* | The VS Code Java Team | |
| 10 | +| *Definition type* | Dockerfile | |
| 11 | +| *Languages, platforms* | Azure Functions, Java | |
| 12 | + |
| 13 | +## Using this definition with an existing folder |
| 14 | + |
| 15 | +This definition requires an Azure subscription to use. You can create a [free account here](https://azure.microsoft.com/en-us/free/serverless/), learn more about using [Azure Functions with VS Code](https://docs.microsoft.com/en-us/azure/azure-functions/functions-create-first-function-vs-code) and [Java Azure Functions with VS Code](https://code.visualstudio.com/docs/java/java-azurefunctions) here. Once you have an Azure account, follow these steps: |
| 16 | + |
| 17 | +1. If this is your first time using a development container, please follow the [getting started steps](https://aka.ms/vscode-remote/containers/getting-started) to set up your machine. |
| 18 | + |
| 19 | +2. To use VS Code's copy of this definition: |
| 20 | + 1. Start VS Code and open your project folder. |
| 21 | + 2. Press <kbd>F1</kbd> select and **Remote-Containers: Create Container Configuration File...** from the command palette. |
| 22 | + 3. Select the Azure Functions & Java 8 definition. |
| 23 | + |
| 24 | +3. To use latest-and-greatest copy of this definition from the repository: |
| 25 | + 1. Clone this repository. |
| 26 | + 2. Copy the contents of `containers/azure-functions-java-8/.devcontainer` to the root of your project folder. |
| 27 | + 3. Start VS Code and open your project folder. |
| 28 | + |
| 29 | +4. After following step 2 or 3, the contents of the `.devcontainer` folder in your project can be adapted to meet your needs. |
| 30 | + |
| 31 | +5. Finally, press <kbd>F1</kbd> and run **Remote-Containers: Reopen Folder in Container** to start using the definition. |
| 32 | + |
| 33 | +## Testing the definition |
| 34 | + |
| 35 | +This definition includes some test code that will help you verify it is working as expected on your system. Follow these steps: |
| 36 | + |
| 37 | +1. If this is your first time using a development container, please follow the [getting started steps](https://aka.ms/vscode-remote/containers/getting-started) to set up your machine. |
| 38 | +2. Clone this repository. |
| 39 | +3. Start VS Code, press <kbd>F1</kbd>, and select **Remote-Containers: Open Folder in Container...** |
| 40 | +4. Select the `containers/azure-functions-java-8` folder. |
| 41 | +5. After the folder has opened in the container, press <kbd>F5</kbd> to start the project. |
| 42 | +6. After the debugger is started, type `curl http://localhost:7071/api/HttpTrigger-Java?name=test` in the terminal, you should see "Hello, test" echoed by the Azure Function. |
| 43 | +7. From here, you can add breakpoints or edit the contents of the `test-project` folder to do further testing. |
| 44 | + |
| 45 | +## License |
| 46 | + |
| 47 | +Copyright (c) Microsoft Corporation. All rights reserved. |
| 48 | + |
| 49 | +Licensed under the MIT License. See [LICENSE](https://github.com/Microsoft/vscode-dev-containers/blob/master/LICENSE). |
0 commit comments