Skip to content

Commit fc54c35

Browse files
committed
[GR-42704] Corrections and improving image rendering.
PullRequest: graal/13379
2 parents a01e8b7 + 54ac83d commit fc54c35

File tree

4 files changed

+38
-42
lines changed

4 files changed

+38
-42
lines changed

docs/reference-manual/native-image/guides/build-native-shared-library.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ $GRAALVM_HOME/bin/gu install llvm-toolchain
116116

117117
```shell
118118
$GRAALVM_HOME/bin/javac LibEnvMap.java
119-
$GRAALVM_HOME/bin/native-image -H:Name=LibEnvMap --shared
119+
$GRAALVM_HOME/bin/native-image -H:Name=libenvmap --shared
120120
```
121121

122122
It will produce the following artifacts:

docs/reference-manual/native-image/guides/build-spring-app-into-native-executable.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Now follow these steps to create a Spring Boot REST-based application and compil
3939

4040
- Go to [start.spring.io](https://start.spring.io/) and select the following values:
4141

42-
![Spring Initializr](../assets/spring_initializr.png)
42+
![Spring Initializr](img/spring_initializr.png)
4343

4444
Make sure you add the **GraalVM Native Support** dependency, and name the artifact and project "jibber".
4545

docs/tools/vscode/graalvm/README.md

Lines changed: 36 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,25 @@ permalink: /tools/vscode/graalvm-extension/
1414
* [Native Image Support](#native-image-support)
1515
* [Extension Settings](#extension-settings)
1616

17-
[GraalVM Tools for Java](https://marketplace.visualstudio.com/items?itemName=oracle-labs-graalvm.graalvm) extension provides capabilities to manage GraalVM installations and its components in VS Code and locally.
17+
[GraalVM Tools for Java](https://marketplace.visualstudio.com/items?itemName=oracle-labs-graalvm.graalvm) extension provides capabilities to manage GraalVM installations and its components in VS Code and/or locally.
1818
The extension ships a GraalVM installation and configuration wizard.
1919
You can conveniently set up the default Java runtime to GraalVM JDK which comes with both just-in-time ([Graal](../../../reference-manual/java/compiler.md)) and ahead-of-time ([Native Image](../../../reference-manual/native-image/README.md)) compilers, making VS Code a comfortable and convenient integrated environment.
2020

2121
The GraalVM Tools for Java in combination with the [GraalVM Tools for Micronaut](https://marketplace.visualstudio.com/items?itemName=oracle-labs-graalvm.micronaut) brings native support for the Micronaut framework in VS Code and opens many more possibilities for Java developers.
2222

23-
> Note: The extension is a Technology Preview, and the development team is actively working on further improvements to provide better usability for developers.
23+
> Note: The extension is a Technology Preview. The development team is actively working on further improvements to provide better usability for developers.
2424
2525
## Extension Installation
2626

2727
To install the GraalVM Tools for Java extension in VS Code, do the following:
2828

2929
1. Navigate to Extensions in the Activity Bar.
3030
2. Search for "GraalVM" in the search field.
31-
3. Once found, click **Install**. That action will install the GraalVM Tools for Java extension from the [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=oracle-labs-graalvm.graalvm).
31+
3. Once found, click **Install**. That action installs the GraalVM Tools for Java extension from the [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=oracle-labs-graalvm.graalvm).
3232
4. Reload when required.
3333

3434
The extension depends on the [Apache NetBeans Language Server](https://marketplace.visualstudio.com/items?itemName=ASF.apache-netbeans-java). (VS Code installs it for you.)
35-
When the extension (and its dependent) is installed, VS Code will display the **Gr** icon in the Activity Bar on the left.
35+
When the extension (and its dependent) is installed, VS Code displays the **Gr** icon in the Activity Bar on the left.
3636

3737
## GraalVM Installation Wizard
3838

@@ -42,8 +42,8 @@ To start, click the **Gr** icon in the Activity Bar. You can either add an exist
4242
A dialogue window suggests these options:
4343
* **Download & Install GraalVM**
4444
* **Add Existing GraalVM**
45-
46-
![GraalVM Install Dialog](images/graalvm_install_actions.png)
45+
46+
<img src="images/graalvm_install_actions.png" alt="GraalVM Install Dialog" style="width: 50%;">
4747

4848
The **Download & Install GraalVM** action is recommended as it eliminates the fuss around setting up environment variables for you.
4949

@@ -67,16 +67,16 @@ Follow these steps to download and install GraalVM Community Edition:
6767
3. Pick one of the available Java versions.
6868
4. Select the destination folder.
6969

70-
The installation will start immediately.
71-
The wizard will download the package from [Github](https://github.com/graalvm/graalvm-ce-builds/releases) in the background and display progress.
70+
The installation starts immediately.
71+
The wizard downloads the package from [Github](https://github.com/graalvm/graalvm-ce-builds/releases) in the background and display progress.
7272

73-
Once the installation completes, the **Install Optional GraalVM Components** window will pop up prompting you to install additional language runtimes and utilities (Native Image, JavaScript, Node.js, LLVM, Python, Ruby, etc.) to the core package:
73+
Once the installation completes, the **Install Optional GraalVM Components** window pops up prompting you to install additional language runtimes and utilities (Native Image, JavaScript, Node.js, LLVM, Python, Ruby, etc.) to the core package:
7474

75-
![Install Optional GraalVM Components](images/install_optional_components_popup.png)
75+
<img src="images/install_optional_components_popup.png" alt="Install Optional GraalVM Components" style="width: 50%;">
7676

7777
Once you confirm, you are taken to the selection list:
7878

79-
![Select Components to Install](images/install_components_action.png)
79+
<img src="images/install_components_action.png" alt="Select Components to Install" style="width: 50%;">
8080

8181
### Download and Install GraalVM Enterprise
8282

@@ -88,11 +88,11 @@ Follow these steps to download and install GraalVM Enterprise:
8888
2. Pick the GraalVM version: one of the latest major stable releases.
8989
3. Pick one of the available Java versions.
9090
4. Select the destination folder.
91-
5. Provide a valid email address where the license will be sent or enter the existing download token.
91+
5. Provide a valid email address where the license should be sent or enter the existing download token.
9292
Supposedly, this is your first installation and you have not accepted the license yet.
9393
Press `Enter`. Once the email address is entered, you see this popup in the bottom right corner:
9494

95-
![Continue Download popup](images/continue_download_gds.png)
95+
<img src="images/continue_download_gds.png" alt="Continue Download popup" style="width: 50%;">
9696

9797
You are sent an email to verify your email address and accept the license.
9898

@@ -102,21 +102,19 @@ Follow these steps to download and install GraalVM Enterprise:
102102

103103
8. Return to VS Code and press **Continue Download** to continue. Your download token is then generated and saved by default in the `.gu/config` file in user's home directory (you can update the storage location later, see below).
104104

105-
![Download Token generated](images/download_token_generated.png)
106-
107-
The download and installation of GraalVM Enterprise will start. You will see the installation notification:
108105

109-
![GraalVM Enterprise installation in progress](images/ee_installation_started.png)
106+
<img src="images/download_token_generated.png" alt="Download Token generated" style="width: 50%;">
110107

111-
The installation wizard will download a package from Oracle's storage point.
108+
The download and installation of GraalVM Enterprise starts.
109+
The installation wizard downloads a package from Oracle's storage point.
112110

113111
If you clicked **Continue Download** without accepting the license, you would see the following warning:
114112

115-
![Continue Download without license acceptance](images/continue_download_not_accepted.png)
113+
<img src="images/continue_download_not_accepted.png" alt="Continue Download without license acceptance" style="width: 50%;">
116114

117115
> Note: If your machine is behind a proxy, you must set your environment variables (`http_proxy`, `https_proxy`) appropriately. You can use the quick command **Setup Proxy**.
118116
119-
Once the installation completes, the **Install Optional GraalVM Components** window will pop up prompting you to install additional language runtimes and utilities (Native Image, JavaScript, Node.js, LLVM, Python, Ruby, etc.) to the core package. Once you confirm, you are taken to the selection list.
117+
Once the installation completes, the **Install Optional GraalVM Components** window pops up prompting you to install additional language runtimes and utilities (Native Image, JavaScript, Node.js, LLVM, Python, Ruby, etc.) to the core package. Once you confirm, you are taken to the selection list.
120118
Since you already have a download token and accepted the license, components will be installed without any additional interaction.
121119

122120
#### Show Current Download Configuration
@@ -126,11 +124,11 @@ Once copied you can re-use the download token, for example, (1) to install Graal
126124

127125
1. Go to **View**, then **Command Palette** and search for **GraalVM: Show GU Configuration**:
128126

129-
![Show Download Configuration action](images/show_gu_config.png)
127+
<img src="images/show_gu_config.png" alt="Show Download Configuration action" style="width: 50%;">
130128

131-
2. Click **GraalVM: Show GU Configuration**. You will see the popup window with a similar content:
129+
2. Click **GraalVM: Show GU Configuration**. You see the popup window with a similar content:
132130

133-
![Download Configuration window](images/gu_config_window.png)
131+
<img src="images/gu_config_window.png" alt="Download Configuration window" style="width: 50%;">
134132

135133
3. Copy the download token.
136134

@@ -142,7 +140,7 @@ If you would like to define a custom file containing a download token, you can d
142140
2. Open the GraalVM for Java extension settings and find the **GU** field.
143141
3. Provide a custom file containing the download token:
144142

145-
![Download Configuration window](images/define_custom_path.png)
143+
<img src="images/define_custom_path.png" alt="Download Configuration window" style="width: 50%;">
146144

147145
## Set Default Java Runtime
148146

@@ -152,10 +150,10 @@ When the installation is complete, the **Set Default Java** action is invoked.
152150

153151
2. Select both **Set as JAVA for Terminal** options (`JAVA_HOME` and `PATH`) in the **Configure active GraalVM** window:
154152

155-
![Set as JAVA for Terminal](images/set_as_java_for_terminal.png)
153+
<img src="images/set_as_java_for_terminal.png" alt="Set as JAVA for Terminal" style="width: 50%;">
156154

157155
Alternatively, you can invoke the same action from **View**, then **Command Palette** (use the `Ctrl+Shift+P` hot keys combination for Linux, and `Command+Shift+P` for macOS to open the commands palette), and search for "GraalVM".
158-
You will see **GraalVM: Set Active GraalVM Installation** among other actions.
156+
You see **GraalVM: Set Active GraalVM Installation** among other actions.
159157

160158
## Java Development and Debugging
161159

@@ -171,10 +169,10 @@ If VS Code detects the Extension Pack for Java from Microsoft installed, it deac
171169
The GraalVM Tools for Java extension provides integration with [VisualVM](https://visualvm.github.io), the all-in-one Java (and polyglot) monitoring and troubleshooting tool.
172170
VisualVM brings powerful yet easy-to-use visual Java tooling to VS Code.
173171

174-
When you run a Java application, the process ID will be detected automatically and displayed in the **VISUALVM** pane.
172+
When you run a Java application, the process ID is detected automatically and displayed in the **VISUALVM** pane.
175173
Open VisualVM by just clicking the play button:
176174

177-
![VisualVM and VS Code Integration](images/open_visualvm.png)
175+
<img src="images/open_visualvm.png" alt="VisualVM and VS Code Integration" style="width: 50%;">
178176

179177
For more information, see the [dedicated guide](visualvm-integration.md) how to start using VisualVM from within VS Code.
180178

@@ -188,13 +186,13 @@ Thanks to [GraalVM Tools for Java](https://marketplace.visualstudio.com/items?it
188186

189187
GraalVM Tools for Java extension provides the **NATIVE IMAGE** with **Agent** pane to automate the process of tracking and registering dynamic feature calls, making it easier to configure and build a native executable in VS Code. The [tracing agent](../../../reference-manual/native-image/AutomaticMetadataCollection.md) tracks dynamic feature calls whilst your application is running on a JVM, and records those calls into JSON configuration files.
190188

191-
![Native Image Agent pane](images/ni_agent_pane.png)
189+
<img src="images/ni_agent_pane.png" alt="Native Image Agent pane" style="width: 50%;">
192190

193-
> Note: The **NATIVE IMAGE** pane will show up when you open your Java project in VS Code.
191+
> Note: The **NATIVE IMAGE** pane shows up when you open your Java project in VS Code.
194192
195193
> Note: The support for the Native Image agent is experimental.
196194
197-
In the next section you will learn how to build a native executable of a Java application and apply the Tracing agent in VS code.
195+
In the next section you learn how to build a native executable of a Java application and apply the Tracing agent in VS code.
198196

199197
### Building
200198

@@ -203,9 +201,9 @@ To build a native executable of your Java application in VS Code, do the followi
203201
1. Create the _launch.json_ file. If not already created, create a new file from the **Run and Debug** activity panel using the _create a launch.json file_ link. Select the **Java 8+ environment** when asked. Save the _launch.json_ file after editing it.
204202
2. Enable the Tracing agent. Click **Gr** in the left sidebar and expand the **NATIVE IMAGE** pane. Expand **Agent** and click the edit button to configure its state.
205203

206-
Select **enabled** so the Native Image agent will start with the Java process:
204+
Select **enabled** so the Native Image agent starts with the Java process:
207205

208-
![Enable Native Image Agent state](images/enable_ni_agent.png)
206+
<img src="images/enable_ni_agent.png" alt="Enable Native Image Agent state" style="width: 50%;">
209207

210208
> Note: The state is not remembered: if you close the VS Code window, it will change back to **disabled**.
211209
@@ -236,19 +234,17 @@ If you use the Micronaut framework to create your Java project, you can build a
236234
### Building Native Images on Windows
237235

238236
To use Native Image on Windows, you need Visual Studio Build Tools with Windows SDK installed.
239-
The `native-image` builder will only work when it is executed from the **x64 Native Tools Command Prompt**. Check [this link](https://medium.com/graalvm/using-graalvm-and-native-image-on-windows-10-9954dc071311) for more details.
237+
The `native-image` builder only works when it is executed from the **x64 Native Tools Command Prompt**. Check [this link](https://medium.com/graalvm/using-graalvm-and-native-image-on-windows-10-9954dc071311) for more details.
240238

241239
For Windows users, the extension provides a pre-configured x64 command prompt using Microsoft Developer Tools. Assuming you already have Visual Studio Build Tools with Windows SDK, GraalVM with Native Image installed, and opened your Java project in VS Code.
242240

243241
1. In the **NATIVE IMAGE** pane, click on right arrow, **>**:
244242

245-
![NATIVE IMAGE page on Windows](images/ni_pane_windows.png)
246-
247-
It will open a dialog window asking you to select an existing Windows SDK build tools configuration script (`vcvars64.bat`) from the default installation location, or to select a custom configuration script. VS Code will detect the script and pre-populate the path:
243+
<img src="images/ni_pane_windows.png" alt="NATIVE IMAGE page on Windows" style="width: 50%;">
248244

249-
![Provide Path to Microsoft Build Tools Script](images/path_build_tools_script.png)
245+
It opens a dialog window asking you to select an existing Windows SDK build tools configuration script (`vcvars64.bat`) from the default installation location, or to select a custom configuration script. VS Code detects the script and pre-populate the path.
250246

251-
2. Click enter. A new Terminal window will open running inside the x64 native tools command prompt.
247+
2. Click enter. A new Terminal window opens running inside the x64 native tools command prompt.
252248

253249
Note that the path to Windows SDK build tools is saved globally, so next time you open a New Terminal
254250
from the **NATIVE IMAGE** pane, it will run inside the x64 native tools command prompt.
@@ -266,7 +262,7 @@ Learn more about GraalVM Native Image [here](../../../reference-manual/native-im
266262
The GraalVM Tools for Java provide Java-like debugging of a native executable in a running state directly from within VS Code.
267263
You can set breakpoints, inspect the state of your application, even attach the debugger to a native image process in VS Code and step over the Java application source code.
268264

269-
![Native Image Debugging in VS Code](images/debugging_ni_vscode.png)
265+
<img src="images/debugging_ni_vscode.png" alt="Native Image Debugging in VS Code">
270266

271267
> Note: To debug a native executable from within VS Code, you must install GraalVM Enterprise.
272268

0 commit comments

Comments
 (0)