Compile Java source Code to native executable with GraalVM

Published: 27 October 2023
on channel: ZAchary Indy
446
2

demonstration of GraalVM compile to native executable image aka standalone binary on Windows.

you should have following toolkit installed:
MSVC++ Compiler, comes with Visual Studio with C++ Desktop Workload,
I use Visual Studio 2019
GraalVM 20+, I use GraalVM v22 from Gluon

THen , the real project I use is pdftk you can clone from :
https://gitlab.com/pdftk-java/pdftk.


`setgraalvm.bat`

set "GRAALVM_HOME=D:\DEVSDK\graalvm-svm-java17-windows-gluon-22.0.0.3-Final"
set "JAVA_PATH_ADD=%GRAALVM_HOME%;%GRAALVM_HOME%\bin;"
if defined GRAALVM_PATH_BASE (
set "PATH=%GRAALVM_PATH_BASE%"
) else (
set "GRAALVM_PATH_BASE=%PATH%"
)
set "PATH=%JAVA_PATH_ADD%;%PATH%"
set "JAVA_HOME=%GRAALVM_HOME%"
echo - GraalVM v22.0.0.3 [Java 17 Support] is Activated and Used
echo - Added path %JAVA_PATH_ADD%
echo [JAVA_HOME] now [%JAVA_HOME%]
echo.


On this page of the site you can watch the video online Compile Java source Code to native executable with GraalVM with a duration of hours minute second in good quality, which was uploaded by the user ZAchary Indy 27 October 2023, share the link with friends and acquaintances, this video has already been watched 446 times on youtube and it was liked by 2 viewers. Enjoy your viewing!