Making GraalVM-Based Executables Easy
Written by Nikos Vaggalis   
Tuesday, 15 March 2022

Liberica Native Image Kit is a utility for making native images for the JVM, letting you compile applications to executables using the GraalVM native-image compiler.

As a refresher on what a native image is

Native image is the executable binary file that contains your application, all its dependencies, and runtime components, allowing you to run your JVM based program on any supported configuration without the need for installing runtime or any setup. Native image is the easiest way to distribute your program and start it up faster.

Native images have several advantages over JVM interpreted applications: 

  • Almost instant startup time
  • Optimized resource consumption and smaller static footprint
  • Does not require JVM for execution 

But why go for GraalVM over packaging your app with say Launch4J or javapackager? The latter solutions just package your source and dependencies together with the targeted JRE in a dummy executable. When run it just goes through the same JIT compilation procedure, but now just with the embedded JRE. GraalVM on the other hand makes real native executables, no bundled or installation wide JRE necessary.

On the other hand why just not use the GraalVM toolkit directly?As with Spring Native, NIK in essence is a layer over GraalVM which makes interfacing with it much easier by taking care of the necessary configuration out of the box.

Liberica NIK contains the open source builds of Liberica JDK (the two latest Java LTS versions, Java 11 and Java 17, are supported) and a suitable GraalVM Native Image, being fully aligned with GraalVM’s release cadence. NIK is compatible with Linux distributions including Alpine, Windows, and macOS. And it works with containerized applications too.

There's also Liberica NIK Core, a version of Liberica NIK that is restricted to Java-only support. It is perfect for pure Java development, particularly when paired with Spring Native.

Since NIK goes the AOT way, which I've covered in Micronaut 3. 2 Released for More Performant Microservices, it can make executables for Microservices frameworks that are AOT-based, that is Quarkus, Micronaut and Spring Native too.

Talking about Spring Native, BellSoft has announced a support agreement with VMware, that enables a fully supported end-to-end native solution for Spring Boot. Integrating NIK into it, developers will be able to produce Spring Boot native applications seamlessly.

The latest version of NIK contains several enhancements and bug fixes with the most important update being adding support for OpenJFX for MacOS, so that you can develop rich JavaFX apps on Mac.

NIK is based on Liberica JDK and Liberica JDK 17.0.2+9 version. The distribution also includes: 

  • LLVM - 12.0.1 (GraalVM CE Native
  • Python - 3.8.5 (GraalVM CE Native
  • Node - v14.18.1
  • Java Script - GraalVM JavaScript (GraalVM CE Native
  • R - 4.0.3 (FastR)
  • TruffleRuby - (Ruby 2.7.4)
  • Native Image - GraalVM Version (Liberica JDK, LTS and Liberica JDK 17.0.2+9, LTS)
  • Wasm - WebAssembly (GraalVM CE Native 

Full release notes at Liberica Native Image Kit Release Notes.

Available from the  Download Centerr


More Information

Liberica Native Image Kit

Create a microservices constellation with Micronaut and Liberica Native Image Kit

Quarkus and Liberica Native Image Kit: it takes two to make a difference

The new Spring is here!

Related Articles

Micronaut 3. 2 Released for More Performant Microservices

GraalVM Under The Covers

Quarkus 2.7.1 Released - Why Quarkus?

Compile Spring Applications To Native Images With Spring Native


To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.


Query Your Oracle Autonomous Database With Natural Language

Select AI is a new feature of the Oracle Autonomous Database that transforms your mother language to SQL. This is a big boon for non-developers in extracting value out of their data silos.

GitLab Releases Duo Chat

GitLab has announced that Duo Chat is now generally available in GitLab 16.11, offering a range of AI features in a single natural language chat experience.

More News

raspberry pi books



or email your comment to:

Last Updated ( Tuesday, 15 March 2022 )