Skip to main content

graalvm

· One min read
wget --no-check-certificate 'https://github.com.cnpmjs.org/graalvm/graalvm-ce-builds/releases/download/vm-21.3.0/graalvm-ce-java11-linux-amd64-21.3.0.tar.gz'
mkdir /etc/graalvm
tar -zxvf graalvm-ce-java11-linux-amd64-21.3.0.tar.gz -C /etc/graalvm
export PATH=$PATH:/etc/graalvm/graalvm-ce-java11-21.3.0/bin
# docker pull docker.io/springci/graalvm-ce:java11-0.11.x

# yum install gcc glibc-devel zlib-devel
gu install native-image
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
}
// javac HelloWorld.java
// native-image -jar HelloWorld
// ./HelloWorld

quarkus

./gradlew build -Dquarkus.package.type=native -Dquarkus.native.container-build=true -Dquarkus.native.native-image-xmx=8g