Building a Native Image
Ahead-of-time compilation.
Building a Native Image
The native-image tool turns compiled Java bytecode into a single, self-contained native executable. This lesson walks through the build process, what happens under the hood, and how to run the result.
Start with Ordinary Java
Native image begins from normal compiled classes. Here is a plain program we will imagine compiling to native code.
public class Hello {
public static void main(String[] args) {
System.out.println("Hello from a native binary!");
}
}All lessons in this course
- What Is GraalVM
- Building a Native Image
- Reflection and Configuration
- Trade-offs of Native Image