Windows下graalvm JDK下载和native-image安装编译
1.graalvm JDK download:
https://www.graalvm.org/downloads/
2.install native-image:
D:\Program Files\java\graalvm-jdk-17\bin>gu install native-image
3.手动编译
D:\>javac HelloWorld.java
运行,输出“Hello World”,表明程序没有问题。
D:\>java HelloWorld
Hello, World!
2.编译
D:\>native-image HelloWorld # 需要visual studio支持:vcvarsall.bat ---会直接把class编译成机器码
3.运行
D:\>helloworld
refs:
https://www.graalvm.org/latest/reference-manual/native-image/
https://www.graalvm.org/latest/docs/getting-started/linux/
https://www.graalvm.org/latest/docs/getting-started/