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
{{ message }}
This repository was archived by the owner on Feb 23, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: spring-native-docs/src/main/asciidoc/getting-started-native-build-tools.adoc
+9-3Lines changed: 9 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,14 +15,22 @@ There are various distributions of the `native-image` compiler available, here w
15
15
* https://www.graalvm.org/[GraalVM] CE based on the https://github.com/oracle/graal[GraalVM open-source repository] and LabsJDK
16
16
* 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
17
17
18
+
===== Linux and MacOS
19
+
18
20
To install the native image compiler on MacOS or Linux, we recommend using https://sdkman.io/[SDKMAN]:
19
21
20
22
* https://sdkman.io/install[Install SDKMAN].
21
23
* 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`
22
24
* Make sure to use the newly installed JDK with `sdk use java {graalvm-version}.r11-nik`
23
25
* Run `gu install native-image` to bring in the native-image extensions to the JDK.
24
26
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.
26
34
27
35
==== Sample Project Setup
28
36
@@ -317,8 +325,6 @@ $ gradle nativeCompile
317
325
$ gradle nativeCompile
318
326
----
319
327
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
-
322
328
This command creates a native executable containing your Spring Boot application in the `target` directory.
0 commit comments