Ahead-of-time compiled applications use only a fraction of the resources required by the JVM which means they cost less to run and improve utilization.
Native image reduces attack surface area by removing all unused classes, method, and fields from your application and libraries while making reverse engineering difficult by converting Java bytecode into native machine code.
Ahead-of-time compiled applications start in milliseconds and deliver peak performance with no warmup.
Ideal for Containers
Compact native executables can be packaged in lightweight container images for more secure, faster, and efficient deployments.
Native Image at Scale
Alibaba, a global e-commerce company, uses Native Image to compile microservices into native executables, which results in faster startup times and rapid horizontal scaling. For example, compiling for a typical microservice application which uses Spring Boot, Tomcat, and MySQL-Connector with GraalVM Native Image decreased startup time from 60 sec to just 3.
Java Framework Support
Simplify Native Image usage with integrated support from leading frameworks
Micronaut is a modern full-stack application framework for microservices and serverless functions. Micronaut eliminates Java reflection so that applications start fast, run fast, and enjoy reduced memory requirements. With out-of-the-box support for Native Image, applications can be easily compiled into native executables, packaged in containers, and deployed.Learn more
Spring is an application framework and inversion of control container, providing a productive programming and configuration model for Java applications. The Spring Native project provides support for compiling Spring Boot applications into native executables using GraalVM Native Image.Learn more
Helidon is a collection of Java libraries for creating microservices-based applications that run on a fast web core powered by Netty. With integrated GraalVM Native Image support, Helidon applications can be compiled ahead-of-time into small native executables, packaged in containers, and deployed.Learn more
Quarkus is an open source, full-stack, Kubernetes-native Java framework made for Java virtual machines (JVMs) and native compilation with GraalVM Native Image, designed to optimize Java making it efficient for containers, cloud, and serverless environments.Learn more
Developing with Native Image
Native Image support for JUnit generates native binaries that include tests, application classes, and required libraries so that tests can be run against native machine code executables. Learn more →
Generate native executables with debug information and use GDB just like you would for C and C++ applications. For an even better experience, use the GraalVM tools for Java in VS Code to set breakpoints, attach to a native executable, inspect values, and step through code the same way you would when debugging a Java app on the JVM. Learn more →
Native executables are ideal for containers given their size and simplicity. With static, "mostly static", and dynamic linking options along with support for both glibc and musl C libraries, native executables can be deployed on virtually any lightweight base image. Learn more →