Skip to content
This repository was archived by the owner on Feb 23, 2023. It is now read-only.

Commit f6d949b

Browse files
committed
Improve Windows support documentation
Closes gh-1319
1 parent 5b6fa3c commit f6d949b

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

spring-native-docs/src/main/asciidoc/getting-started-native-build-tools.adoc

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,22 @@ There are various distributions of the `native-image` compiler available, here w
1515
* https://www.graalvm.org/[GraalVM] CE based on the https://github.com/oracle/graal[GraalVM open-source repository] and LabsJDK
1616
* Bellsoft https://bell-sw.com/pages/liberica-native-image-kit/[Liberica Native Image Kit] (NIK) based on the https://github.com/oracle/graal[GraalVM open-source repository] and Liberica JDK
1717

18+
===== Linux and MacOS
19+
1820
To install the native image compiler on MacOS or Linux, we recommend using https://sdkman.io/[SDKMAN]:
1921

2022
* https://sdkman.io/install[Install SDKMAN].
2123
* Install a GraalVM native-image distribution, either GraalVM CE (`grl` suffix) or Bellsoft Liberica NIK (`nik` suffix), here we go with Liberica NIK Java 11 variant: `sdk install java {graalvm-version}.r11-nik`
2224
* Make sure to use the newly installed JDK with `sdk use java {graalvm-version}.r11-nik`
2325
* Run `gu install native-image` to bring in the native-image extensions to the JDK.
2426

25-
Alternatively or if you are on Microsoft Windows, you can manually install builds from https://www.graalvm.org/downloads/[GraalVM] or https://bell-sw.com/pages/downloads/native-image-kit/[Liberica NIK]. Don't forget to set `JAVA_HOME` / `PATH` appropriately if needed and to run `gu install native-image` to bring in the native-image extensions.
27+
Alternatively, you can manually install builds from . Don't forget to set `JAVA_HOME` / `PATH` appropriately if needed and to run `gu install native-image` to bring in the native-image extensions.
28+
29+
===== Windows
30+
31+
On Windows, follow https://medium.com/graalvm/using-graalvm-and-native-image-on-windows-10-9954dc071311[those instructions] to install either https://www.graalvm.org/downloads/[GraalVM] or https://bell-sw.com/pages/downloads/native-image-kit/[Liberica NIK], Visual Studio Build Tools and Windows SDK. Due to a well-known https://docs.microsoft.com/en-US/troubleshoot/windows-client/shell-experience/command-line-string-limitation[Windows limitations related command-line maximum length], make sure to use x64 Native Tools Command Prompt instead of the regular Windows command line to run Maven or Gradle plugins.
32+
33+
WARNING: https://graalvm.github.io/native-build-tools/latest/maven-plugin.html#long_classpath_and_shading_support[Maven requires additional verbose configuration], so make sure to follow those instructions or use <<getting-started-buildpacks,Buildacks support>> instead.
2634

2735
==== Sample Project Setup
2836

@@ -317,8 +325,6 @@ $ gradle nativeCompile
317325
$ gradle nativeCompile
318326
----
319327

320-
IMPORTANT: On Windows make sure to use x64 Native Tools Command Prompt as recommended in the {graalvm-native-docs}/#prerequisites[GraalVM native-image prerequisites].
321-
322328
This command creates a native executable containing your Spring Boot application in the `target` directory.
323329

324330
==== Run the native application

0 commit comments

Comments
 (0)