GraalVM: Difference between revisions
Jump to navigation
Jump to search
Line 22: | Line 22: | ||
* [https://www.graalvm.org/uploads/graalvm-language-level-virtualization-oracle-tech-papers.pdf GraalVM Language Level Virtualization] | * [https://www.graalvm.org/uploads/graalvm-language-level-virtualization-oracle-tech-papers.pdf GraalVM Language Level Virtualization] | ||
* [https://www.graalvm.org/reference-manual/polyglot-programming/ GraalVM Polyglot Programming] | * [https://www.graalvm.org/reference-manual/polyglot-programming/ GraalVM Polyglot Programming] | ||
* [https://github.com/graalvm/graalvm-ce-builds/releases GraalVM Community Edition] | |||
* [https://docs.docker.com/develop/develop-images/multistage-build/ Docker multi-stage builds] | * [https://docs.docker.com/develop/develop-images/multistage-build/ Docker multi-stage builds] | ||
* [https://www.graalvm.org/reference-manual/native-image/ GraalVM Native Image] | * [https://www.graalvm.org/reference-manual/native-image/ GraalVM Native Image] |
Revision as of 17:45, 27 August 2021
# for oracle linux, debian, redhat
sudo yum install gcc glibc-devel zlib-devel
sudo apt install build-essential libz-dev zlib1g-dev
sudo dnf install gcc glibc-devel zlib-devel libstdc++-static
# to use xcode in macos
xcode-select --install
To build a native image as a shared library of a Java class file, pass --shared
to the native image builder. The created shared library will have the main method of the given Java class as its entrypoint method.
native-image class [libraryname] --shared
To build a native image as a shared library of a JAR file, use:
native-image -jar jarfile [libraryname] --shared
Note: if you build a shared library where you do not specify a main class, you must append the -H:Name=
flag to specify the library name: -H:Name=libraryname
.