Skip to content

Commit 77657b1

Browse files
author
Greg Van Liew
committed
Further edits to Java topics
1 parent 5409ca9 commit 77657b1

File tree

7 files changed

+48
-37
lines changed

7 files changed

+48
-37
lines changed

docs/java/extensions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Area: java
44
TOCTitle: Extensions
55
ContentId: 6076911c-276b-41a3-8510-0022c03c0ef6
66
PageTitle: Java Extensions for VS Code
7-
DateApproved: 11/14/2017
7+
DateApproved: 5/30/2018
88
MetaDescription: Popular Java Extensions for VS Code
99
---
1010
# Java Extensions for VS Code
@@ -76,7 +76,7 @@ Here's a list of Azure extensions supporting Java:
7676

7777
* The [Azure Tools for VS Code](https://marketplace.visualstudio.com/items?itemName=bradygaster.azuretoolsforvscode) adds commands to the **Command Palette** (`kb(workbench.action.showCommands)`) that make it easy to create and access Azure resources directly from VS Code. For example, you can create App Service Web Apps and Functions, Storage accounts, and browse to any number of resources in the Azure Portal.
7878

79-
* The [Azure Resource Manager (ARM) Tools](https://marketplace.visualstudio.com/items?itemName=msazurermtools.azurerm-vscode-tools) provide a rich editing experience for Azure Resource Manager deployment templates and template language expressions. For example, IntelliSense for TLE function names, parameter references, signature help, GoTo Definition, Peek Definitions, and Find All References (Shift+F12) as well as Errors and Warnings, making it quick and easy to author ARM templates in VS Code.
79+
* The [Azure Resource Manager (ARM) Tools](https://marketplace.visualstudio.com/items?itemName=msazurermtools.azurerm-vscode-tools) provide a rich editing experience for Azure Resource Manager deployment templates and template language expressions. For example, IntelliSense for TLE function names, parameter references, signature help, Go to Definition, Peek Definition, and Find All References (Shift+F12) as well as Errors and Warnings, making it quick and easy to author ARM templates in VS Code.
8080

8181
* The [Azure CLI Tools](https://marketplace.visualstudio.com/items?itemName=ms-vscode.azurecli) provide an enhanced editing experience when authoring Azure CLI 2.0 commands, with full completions (IntelliSense), the ability to invoke one or more commands in the terminal, and the ability to easily view and format results as a separate JSON document.
8282

docs/java/java-container.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ Order: 4
33
Area: java
44
TOCTitle: Java with Container
55
ContentId: 4fee9404-306a-4d60-8a7e-94f7d59c2fc3
6-
PageTitle: Java with Docker in VS Code
7-
DateApproved: 3/7/2017
6+
PageTitle: Java with Docker in Visual Studio Code
7+
DateApproved: 5/30/2018
88
MetaDescription:
99
---
1010
# Java with Docker in VS Code
@@ -13,7 +13,7 @@ This tutorial will walk you through building and deploying a [Docker](https://do
1313

1414
We will continue using the same Spring Boot application we built in our first [Java Tutorial](/docs/java/java-tutorial.md).
1515

16-
[Docker](https://docker.com/) is a Linux container management toolkit which allows users to publish and reuse container images. A Docker image is a recipe for running a containerized process. In this tutorial, we will build an Docker image for the web app, run the image locally and then deploy it to the cloud.
16+
[Docker](https://docker.com/) is a Linux container management toolkit which allows users to publish and reuse container images. A Docker image is a recipe for running a containerized process. In this tutorial, we will build an Docker image for the web app, run the image locally, and then deploy it to the cloud.
1717

1818
## Before you begin
1919

@@ -31,7 +31,7 @@ For more information, see [Working with Docker](/docs/azure/docker.md).
3131

3232
## Create a Container
3333

34-
To build your project, navigate to the `complete` folder of the Sprint Boot application, and run the Maven command below in a terminal to create the Java assembly files.
34+
To build your project, navigate to the `complete` folder of the Sprint Boot application, and run the Maven command below in a terminal to create the Java assembly files (JAR).
3535

3636
```bash
3737
mvn clean package
@@ -48,7 +48,7 @@ ENV JAVA_OPTS=""
4848
ENTRYPOINT exec java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar /app.jar
4949
```
5050

51-
Right click the DockerFile from the File Explorer, and choose the **Build Image** command from the context menu. You will be prompted to name your image and once it's done, you can see the image in your Docker Explorer provided by the Docker Extension.
51+
Right click the Dockerfile from the File Explorer, and choose the **Build Image** command from the context menu. You will be prompted to name your image and once it's done, you can see the image in the Docker Explorer provided by the Docker Extension.
5252

5353
![Build Image](images/java-container/build-image.png)
5454

@@ -64,7 +64,7 @@ Test the web app by browsing to `http://localhost:8080` using a web browser. You
6464

6565
## Push your image to Docker Hub
6666

67-
You can deploy your Ddocker image to Azure from either a public or private container registry. In this tutorial, we will use Docker Hub. If you do not have a Docker Hub account, create one from [Docker Hub](https://hub.docker.com/)
67+
You can deploy your Docker image to Azure from either a public or private container registry. In this tutorial, we will use Docker Hub. If you do not have a Docker Hub account, create one from [Docker Hub](https://hub.docker.com/)
6868

6969
The first time you expand the Docker Hub node in Docker Explorer, you'll be prompted to log into your Docker Hub account.
7070

@@ -78,7 +78,7 @@ Now push your image to Docker Hub. Make sure the name of your image starts (is '
7878

7979
## Deploying images to Azure App Service
8080

81-
With the Docker Explorer, you can deploy images from Docker Hub Registries or Azure Container Registries, directly to an Azure App Service instance. This functionality requires installing the [Azure Account](https://marketplace.visualstudio.com/items?itemName=ms-vscode.azure-account) extension and an Azure sSubscription. If you do not have an Azure subscription, [sign up today](https://azure.microsoft.com//free/?b=16.48) for a free 30 day account and get $200 in Azure Credits to try out any combination of Azure services.
81+
With the Docker Explorer, you can deploy images from Docker Hub Registries or Azure Container Registries, directly to an Azure App Service instance. This functionality requires installing the [Azure Account](https://marketplace.visualstudio.com/items?itemName=ms-vscode.azure-account) extension and an Azure subscription. If you do not have an Azure subscription, [sign up today](https://azure.microsoft.com//free/?b=16.48) for a free 30 day account and get $200 in Azure Credits to try out any combination of Azure services.
8282

8383
To log into Azure, after installing the Azure Account extensions, you can run **Azure: Sign in** from the **Command Palette** (`kb(workbench.action.showCommands)`). You then sign into your account using the **Device Login** flow. Click on **Copy & Open** in the notification to open your default browser.
8484

docs/java/java-debugging.md

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ Area: java
44
TOCTitle: Debugging and Testing
55
ContentId: 929e5410-3bfe-4107-b331-565afe5d341f
66
PageTitle: Debugging and Testing Java in VS Code
7-
DateApproved: 3/7/2017
7+
DateApproved: 5/30/2018
88
MetaDescription: See how you can debug and test your Java code locally, and in the cloud.
99
MetaSocialImage:
1010
---
1111
# Debugging Java in VS Code
1212

1313
Visual Studio Code is great at debugging Java applications through the [Debugger for Java](https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-debug) extension.
1414

15-
It's a lightweight Java Debugger based on [Java Debug Server](https://github.com/Microsoft/java-debug) which extends the [Language Support for Java by Red Hat](https://marketplace.visualstudio.com/items?itemName=redhat.java).
15+
It's a lightweight Java debugger based on [Java Debug Server](https://github.com/Microsoft/java-debug) which extends the [Language Support for Java by Red Hat](https://marketplace.visualstudio.com/items?itemName=redhat.java).
1616

1717
Here's a list of supported debugging features:
1818

@@ -22,11 +22,11 @@ Here's a list of supported debugging features:
2222
- Pause & Continue
2323
- Step In/Out/Over
2424
- Variables
25-
- Callstacks
25+
- Call Stacks
2626
- Threads
27-
- Debug console
27+
- Debug Console
2828

29-
The Java debugger is an open source project which welcomes contributors to collaborate through the GitHub repositories:
29+
The Java debugger is an open source project which welcomes contributors to collaborate through GitHub repositories:
3030

3131
- [Debugger for Java Extension](https://github.com/Microsoft/vscode-java-debug)
3232
- [Java Debugger Server for Visual Studio Code](https://github.com/Microsoft/java-debug)
@@ -35,7 +35,7 @@ To run and debug JUnit test, you can also install the [Java Test Runner](https:/
3535

3636
## Install
3737

38-
For the debugger to work, you also need to have the [Language Support for Java(TM) by Red Hat](https://marketplace.visualstudio.com/items?itemName=redhat.java) extension installed. To make it easier, there is a [Java Extension Pack](https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-pack) which bundles the [Language Support for Java(TM) by Red Hat](https://marketplace.visualstudio.com/items?itemName=redhat.java), the [Debugger for Java](https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-debug) and several other popular Java [extensions](/docs/java/extensions.md).
38+
For the debugger to work, you also need to have the [Language Support for Java(TM) by Red Hat](https://marketplace.visualstudio.com/items?itemName=redhat.java) extension installed. To make it easier, there is a [Java Extension Pack](https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-pack) which bundles the [Language Support for Java(TM) by Red Hat](https://marketplace.visualstudio.com/items?itemName=redhat.java), the [Debugger for Java](https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-debug) and several other popular Java [extensions](/docs/java/extensions.md).
3939

4040
You can manually install the extension pack from the Extensions view (`kb(workbench.view.extensions)`) by typing `vscode-java-pack` in the search box. You will also be prompted to install the Java Extension Pack when you edit a Java file in VS Code for the first time.
4141

@@ -57,18 +57,26 @@ If there's no debug configuration file `launch.json` in your project, the debugg
5757

5858
You can also configure the `launch.json` yourself to set customized settings or attach to another Java process.
5959

60-
You can also use VS Code to run and debug single Java files without any project.
60+
### Debugging single files
61+
62+
VS Code can run and debug single Java files without any project.
6163

6264
![Debug Single File](images/java-debugging/single-file.gif)
6365

66+
### Debugging external files
67+
6468
The Java debugger also supports external source files. This lets you debug third party classes when they are inside a JAR or a source attachment. Set your breakpoints in those classes before you start debugging. Java 9 is supported with VS Code as well.
6569

6670
![Java 9 Support](images/java-debugging/java9.gif)
6771

72+
### Debug session inputs
73+
6874
The default Debug Console in VS Code doesn't support inputs. If your program need inputs from a terminal, you can use the Integrated Terminal (`kb(workbench.action.terminal.toggleTerminal)`) within VS Code or an external terminal to launch it.
6975

7076
![Launch in Terminal](images/java-debugging/launch-in-terminal.gif)
7177

78+
### Step filtering
79+
7280
Step filter is supported by the extension to filter out types that you do not wish to see or step through while debugging. With this feature, you can configure the packages to filter within your `launch.json` so they could be skipped when you step through.
7381

7482
![Step Filter](images/java-debugging/step-filter.gif)
@@ -77,17 +85,19 @@ The debugger also lets you evaluate expressions in the **WATCH** window as well
7785

7886
![Expression Evaluation](images/java-debugging/expression-evaluation.gif)
7987

80-
Another advanced feature the debugger supports is 'hot code' replacement. Hot code replacement (HCR) is a debugging technique whereby the Java debugger transmits new class files over the debugging channel to another Java Virtual Machine (JVM). HCR facilitates experimental development and fosters iterative trial-and-error coding. With this new feature, you can start a debugging session and change a Java file in your development environment, and the debugger will replace the code in the running JVM. No restart is required, which is why it’s called "hot". Below is an illustration of how you can use HCR with Debugger for Java in VS Code.
88+
### Hot Code replacement
89+
90+
Another advanced feature the debugger supports is 'Hot Code' replacement. Hot code replacement (HCR) is a debugging technique whereby the Java debugger transmits new class files over the debugging channel to another Java Virtual Machine (JVM). HCR facilitates experimental development and fosters iterative trial-and-error coding. With this new feature, you can start a debugging session and change a Java file in your development environment, and the debugger will replace the code in the running JVM. No restart is required, which is why it’s called "hot". Below is an illustration of how you can use HCR with Debugger for Java in VS Code.
8191

8292
![Hot Code Replacement](images/java-debugging/hcr.gif)
8393

84-
There're a lot of different [options and settings](#options) available to configure the debugger. For example, configuring the current working directory (cwd) and environment variables is easily done with launch options.
94+
## Configuration
8595

86-
![Configure Variables](images/java-debugging/cwd-env.gif)
96+
There are many options and settings available to configure the debugger. For example, configuring the current working directory (cwd) and environment variables is easily done with launch options.
8797

88-
Also check the documentation of [Language Support for Java by Red Hat](https://marketplace.visualstudio.com/items?itemName=redhat.java) for help in setting up your project.
98+
![Configure Variables](images/java-debugging/cwd-env.gif)
8999

90-
## Options
100+
Consult the documentation for the [Language Support for Java by Red Hat](https://marketplace.visualstudio.com/items?itemName=redhat.java) extension for help in setting up your project.
91101

92102
### Launch
93103

@@ -132,7 +142,7 @@ Also check the documentation of [Language Support for Java by Red Hat](https://m
132142
- `java.debug.settings.showStaticVariables` - Show static variables in in the **VARIABLES** view, defaults to `true`.
133143
- `java.debug.settings.showQualifiedNames` - Show fully qualified class names in in the **VARIABLES** view, defaults to `false`.
134144
- `java.debug.settings.maxStringLength` - Maximum length of strings displayed in the **VARIABLES** view or Debug Console. Strings longer than this length will be trimmed. Default is `0` which means no trim is performed.
135-
- `java.debug.settings.enableHotCodeReplace` - Enable hot code replacement for Java code. Make sure the auto build is not disabled for [VSCode Java](https://github.com/redhat-developer/vscode-java). See the [wiki page](https://github.com/Microsoft/vscode-java-debug/wiki/Hot-Code-Replace) for more information about usages and limitations.
145+
- `java.debug.settings.enableHotCodeReplace` - Enable Hot Code replacement for Java source code. Make sure the auto build is not disabled for [VS Code Java](https://github.com/redhat-developer/vscode-java). See the [wiki page](https://github.com/Microsoft/vscode-java-debug/wiki/Hot-Code-Replace) for more information about usages and limitations.
136146

137147
## Feedback and Questions
138148

@@ -153,3 +163,4 @@ You can also manage your test cases with **TEST EXPLORER**.
153163
Read on to find out about:
154164

155165
* [Debugging](/docs/editor/debugging.md) - Find out how to use the debugger with your project for any language.
166+
* [Java Extensions](/docs/java/extensions.md) - Learn about more useful Java extensions for VS Code.

docs/java/java-serverless.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ Area: java
44
TOCTitle: Java Serverless
55
ContentId: a3071f40-4987-4054-99cb-3d122d23bf47
66
PageTitle: Writing serverless Java Application with VS Code
7-
DateApproved: 3/7/2017
7+
DateApproved: 5/30/2018
88
MetaDescription: Using VS Code for developing, debugging and deploying your serverless application.
99
---
1010
# Serverless Java Apps with VS Code
1111

1212
Serverless, as indicated by its name, allows you to execute your code in an environment without having to first create a VM or publish a web application.
1313

14-
This tutorial guides you through creating a [serverless](https://azure.microsoft.com/overview/serverless-computing/) function project and deploy to [Azure](https://azure.microsoft.com) with Visual Studio Code and the [Azure Functions](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azurefunctions) extension. You be able to test it locally and deploy it to [Azure Functions](https://azure.microsoft.com/services/functions). When you're done, you'll have a HTTP-triggered function app running in Azure.
14+
This tutorial guides you through creating a [serverless](https://azure.microsoft.com/overview/serverless-computing/) function project and deploying to [Azure](https://azure.microsoft.com) with Visual Studio Code and the [Azure Functions](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azurefunctions) extension. You'll be able to test the function locally and then deploy it to [Azure Functions](https://azure.microsoft.com/services/functions). When you're done, you'll have a HTTP-triggered function app running in Azure.
1515

1616
## Prerequisites
1717

@@ -46,7 +46,7 @@ Once you've installed the Azure Functions extension, you can easily create a new
4646
3. Select Java the target language.
4747
4. Fill in the parameters.
4848

49-
The extension use [Maven archetype](https://maven.apache.org/guides/introduction/introduction-to-archetypes.html) to create the function project in the folder you specified.
49+
The extension uses [Maven archetypes](https://maven.apache.org/guides/introduction/introduction-to-archetypes.html) to create the function project in the folder you specified.
5050

5151
![Create Functions Project](images/java-serverless/create-functions.png)
5252

@@ -80,7 +80,7 @@ public class Function {
8080

8181
**Note**: This step is optional and only required to locally run and debug your Java Functions source code.
8282

83-
The [Azure Functions Core Tools 2.0](https://www.npmjs.com/package/azure-functions-core-tools) provides a local development environment for writing, running, and debugging Azure Functions. The installation package for v2 is a self-contained cross-platform package
83+
The [Azure Functions Core Tools 2.0](https://www.npmjs.com/package/azure-functions-core-tools) provides a local development environment for writing, running, and debugging Azure Functions. The installation package for v2 is a self-contained cross-platform package.
8484

8585
### Windows
8686

@@ -123,7 +123,7 @@ sudo apt-get update
123123
sudo apt install azure-functions-core-tools
124124
```
125125

126-
[Code and test Azure Functions locally](https://docs.microsoft.com/azure/azure-functions/functions-run-local)
126+
You can learn more by reading the [Code and test Azure Functions locally](https://docs.microsoft.com/azure/azure-functions/functions-run-local) How-to guide.
127127

128128
**NOTE**: [npm](https://www.npmjs.com/) can be used on all platforms. On Unix platforms, you may need to specify `--unsafe-perm` if you are running `npm` with sudo. This is necessary due to npm's post install script behavior.
129129

@@ -232,4 +232,4 @@ Now you can set a break point and attach to your cloud function using VS Code. W
232232
You have created a Java function app with a simple HTTP trigger and deployed it to Azure Functions.
233233

234234
- Review the [Java Functions developer guide](https://docs.microsoft.com/azure/azure-functions/functions-reference-java) for more information on developing Java functions.
235-
- To learn more about Java Debugging features, see [Java Debugging Tutorial](/docs/java/java-debugging.md)
235+
- To learn more about Java Debugging features, see [Java Debugging Tutorial](/docs/java/java-debugging.md).

0 commit comments

Comments
 (0)