Liberica NIK 21: Installation Guide
This document provides installation instructions for Liberica Native Image Kit (NIK) 23.1.6+1 (21.0.6+10) on different operating systems.
You can download Liberica NIK from either the Liberica JDK Download Center or, as a support-plan customer, via a link on the support portal. After you log in to the support portal, you can see a direct link to the version of the Liberica product you requested under Technologies. If you use the Liberica Download Center page, scroll down and select the NIK version, OS, and package type. After the download is finished, you can verify the downloaded file by comparing its size on your drive to the size on the Downloads page.
Pick your platform below — your choice is remembered as you scroll and when you switch versions.
Apple macOS
Section titled “Apple macOS”Choose an installation method:
Installing the DMG bundle on macOS
Section titled “Installing the DMG bundle on macOS”-
To run the installer, double-click the file you have downloaded.
-
Double-click the pkg icon to open the Install Liberica NIK Wizard.
-
Click Continue on the Welcome screen.
-
Optionally, you can change the installation location. Press Install to proceed.
-
Confirm the new software installation. The files will start copying immediately.
-
Once the installation is complete, press Close to exit the installation wizard.
Liberica NIK 23.1.6 is installed to the /Library/Java/LibericaNativeImageKit/liberica-vm-23.1.6-openjdk21/ directory, or another directory with a similar name in /Library/Java/LibericaNativeImageKit, depending on the selected version of the JDK and package type (core, standard, or full). You can use the $NIK_HOME environment variable to store the path to the installed package: /Library/Java/LibericaNativeImageKit/liberica-vm-23.1.6-openjdk21/Contents/Home/.
Installing the ZIP bundle on macOS
Section titled “Installing the ZIP bundle on macOS”-
To install Liberica NIK, download the
.zippackage.Terminal window curl -O https://download.bell-sw.com/vm/23.1.6/bellsoft-liberica-vm-openjdk21.0.6+10-23.1.6+1-macos-amd64.zip -
After the download is finished, unpack the file.
Terminal window unzip bellsoft-liberica-vm-openjdk21.0.6+10-23.1.6+1-macos-amd64.zipsudo mv bellsoft-liberica-vm-openjdk21-23.1.6 /Library/Java/LibericaNativeImageKit/This unpacks Liberica NIK to
/Library/Java/LibericaNativeImageKit/. Either add theContents/Home/binsubdirectory to$PATH, or remember/Library/Java/LibericaNativeImageKit/bellsoft-liberica-vm-openjdk21-23.1.6/Contents/Home/as the$NIK_HOMEenvironment variable.
To uninstall Liberica NIK, simply remove its directory and unset the related environment variables.
Installing with SDKMAN!
Section titled “Installing with SDKMAN!”SDKMAN! installs Liberica NIK as a Java candidate (the -nik suffix), on macOS and Linux. Run sdk list java | grep nik to find the current Liberica NIK identifier for JDK 21, then install it:
sdk install java <identifier-from-the-list>Installing language packages on macOS
Section titled “Installing language packages on macOS”Except for the Core version (which comes bundled with the native image plugin and does not allow the installation of additional components), all packages of Liberica Native Image Kit contain a component updater called gu. You can use it to install or update Liberica NIK plugins or add support for additional languages in the distribution.
Open the terminal and type:
$NIK_HOME/bin/gu availableYou’ll see a list of available languages:
Downloading: Component catalog from download.bell-sw.comComponentId Version Component name Stability Origin-----------------------------------------------------------------------------icu4j 23.1.6 ICU4J Supported download.bell-sw.comjs 23.1.6 Graal.js Supported download.bell-sw.comllvm 23.1.6 LLVM Runtime Core Supported download.bell-sw.comllvm-toolchain 23.1.6 LLVM.org toolchain Supported download.bell-sw.comnodejs 23.1.6 Graal.nodejs Supported download.bell-sw.compython 23.1.6 GraalVM Python Experimental download.bell-sw.comR 23.1.6 FastR Experimental download.bell-sw.comregex 23.1.6 TRegex Supported download.bell-sw.comruby 23.1.6 TruffleRuby Experimental download.bell-sw.comwasm 23.1.6 GraalWasm Experimental download.bell-sw.comExecute $NIK_HOME/bin/gu install [language] to install a specific language. For example, $NIK_HOME/bin/gu install python.
This can also be executed manually:
curl -O https://download.bell-sw.com/vm/23.1.6/python-installable-openjdk21.0.6+10-23.1.6+1-macos-amd64.jar$NIK_HOME/bin/gu -L install python-installable-openjdk21.0.6+10-23.1.6+1-macos-amd64.jarLiberica NIK dependencies on macOS
Section titled “Liberica NIK dependencies on macOS”Install the necessary tools with the following command:
xcode-select --installChoose an installation method:
Installing DEB and RPM packages
Section titled “Installing DEB and RPM packages”Download either the .rpm or .deb package, then install it using the appropriate package manager.
For an Apt-based system:
sudo apt install ./bellsoft-liberica-vm-openjdk21.0.6+10-23.1.6+1-linux-amd64.debOr for an RPM-based system:
sudo yum install ./bellsoft-liberica-vm-openjdk21.0.6+10-23.1.6+1-linux-amd64.rpmThe package is installed to /opt/bellsoft/liberica-vm-23.1.6-openjdk21/.
For scripting purposes, we recommend adding the ${NIK_HOME} environment variable that points to your Liberica Native Image Kit installation directory.
Installing the standalone NIK package on GNU/Linux
Section titled “Installing the standalone NIK package on GNU/Linux”-
To install Liberica NIK, download the
.tar.gzpackage and unpack it with the following commands:Terminal window export INSTALL_DIR=<your directory>tar -C $INSTALL_DIR -xzf bellsoft-liberica-vm-openjdk21.0.6+10-23.1.6+1-linux-amd64.tar.gz -
This unpacks Liberica NIK to the selected directory. Either add
$INSTALL_DIR/bellsoft-liberica-vm-openjdk21-23.1.6/binto$PATH, or remember$INSTALL_DIR/bellsoft-liberica-vm-openjdk21-23.1.6as the$NIK_HOMEenvironment variable.
To uninstall Liberica NIK, simply remove this directory and unset the related environment variables.
Installing with SDKMAN!
Section titled “Installing with SDKMAN!”SDKMAN! installs Liberica NIK as a Java candidate (the -nik suffix). Run sdk list java | grep nik to find the current Liberica NIK identifier for JDK 21, then install it:
sdk install java <identifier-from-the-list>Installing language packages on Linux
Section titled “Installing language packages on Linux”Open the terminal and type:
$NIK_HOME/bin/gu availableYou’ll see a list of available languages:
Downloading: Component catalog from download.bell-sw.comComponentId Version Component name Stability Origin-----------------------------------------------------------------------------icu4j 23.1.6 ICU4J Supported download.bell-sw.comjs 23.1.6 Graal.js Supported download.bell-sw.comllvm 23.1.6 LLVM Runtime Core Supported download.bell-sw.comllvm-toolchain 23.1.6 LLVM.org toolchain Supported download.bell-sw.comnodejs 23.1.6 Graal.nodejs Supported download.bell-sw.compython 23.1.6 GraalVM Python Experimental download.bell-sw.comR 23.1.6 FastR Experimental download.bell-sw.comregex 23.1.6 TRegex Supported download.bell-sw.comruby 23.1.6 TruffleRuby Experimental download.bell-sw.comwasm 23.1.6 GraalWasm Experimental download.bell-sw.comExecute $NIK_HOME/bin/gu install [language] to install a specific language. For example, $NIK_HOME/bin/gu install python.
This can also be executed manually:
wget https://download.bell-sw.com/vm/23.1.6/python-installable-openjdk21.0.6+10-23.1.6+1-linux-amd64.jar$NIK_HOME/bin/gu -L install python-installable-openjdk21.0.6+10-23.1.6+1-linux-amd64.jarLiberica NIK dependencies on Linux
Section titled “Liberica NIK dependencies on Linux”Several libraries are required for Liberica Native Image Kit on Linux systems. Install these libraries on Debian-based systems with the following command:
sudo apt install g++ make zlib1g-devYou can use a similar command to install dependencies on RPM-based systems. See this example for CentOS:
sudo yum install gcc-c++ make zlib-develOther types of Linux systems may require different packages.
Alpine Linux
Section titled “Alpine Linux”Choose an installation method:
Installing the APK package on Alpine Linux
Section titled “Installing the APK package on Alpine Linux”Download the .apk package, then install it using the appropriate package manager:
# Add public key to check signaturewget -P /etc/apk/keys/ https://apk.bell-sw.com/[email protected]# Install packagesudo apk add ./bellsoft-liberica-vm-openjdk21.0.6+10-23.1.6+1-linux-x64-musl.apkThe package is installed to /opt/bellsoft/liberica-vm-23.1.6-openjdk21/.
For scripting purposes, we recommend adding the ${NIK_HOME} environment variable that points to your Liberica Native Image Kit installation directory.
Installing the standalone NIK package on Alpine Linux
Section titled “Installing the standalone NIK package on Alpine Linux”-
To install Liberica NIK, download the
.tar.gzpackage:Terminal window wget https://download.bell-sw.com/vm/23.1.6/bellsoft-liberica-vm-openjdk21.0.6+10-23.1.6+1-linux-x64-musl.tar.gz -
Unpack it with the following command:
Terminal window export INSTALL_DIR=<your directory>tar -C $INSTALL_DIR -xzf bellsoft-liberica-vm-openjdk21.0.6+10-23.1.6+1-linux-x64-musl.tar.gzThis unpacks Liberica NIK to the selected directory. Either add
$INSTALL_DIR/bellsoft-liberica-vm-openjdk21-23.1.6/binto$PATH, or remember$INSTALL_DIR/bellsoft-liberica-vm-openjdk21-23.1.6as the$NIK_HOMEenvironment variable.
To uninstall Liberica NIK, simply remove this directory and unset the related environment variables.
Installing language packages on Alpine Linux
Section titled “Installing language packages on Alpine Linux”Open the terminal and type:
$NIK_HOME/bin/gu availableYou’ll see a list of available languages:
Downloading: Component catalog from download.bell-sw.comComponentId Version Component name Stability Origin-----------------------------------------------------------------------------icu4j 23.1.6 ICU4J Supported download.bell-sw.comjs 23.1.6 Graal.js Supported download.bell-sw.comllvm 23.1.6 LLVM Runtime Core Supported download.bell-sw.comllvm-toolchain 23.1.6 LLVM.org toolchain Supported download.bell-sw.comnodejs 23.1.6 Graal.nodejs Supported download.bell-sw.compython 23.1.6 GraalVM Python Experimental download.bell-sw.comR 23.1.6 FastR Experimental download.bell-sw.comregex 23.1.6 TRegex Supported download.bell-sw.comruby 23.1.6 TruffleRuby Experimental download.bell-sw.comwasm 23.1.6 GraalWasm Experimental download.bell-sw.comExecute $NIK_HOME/bin/gu install [language] to install a specific language. For example, $NIK_HOME/bin/gu install python.
This can also be executed manually:
wget https://download.bell-sw.com/vm/23.1.6/python-installable-openjdk21.0.6+10-23.1.6+1-linux-x64-musl.jar$NIK_HOME/bin/gu -L install python-installable-openjdk21.0.6+10-23.1.6+1-linux-x64-musl.jarLiberica NIK dependencies on Alpine Linux
Section titled “Liberica NIK dependencies on Alpine Linux”Several libraries are required for Liberica Native Image Kit on Alpine Linux. Install these libraries with the following command:
sudo apk add bash g++ make zlib-staticMicrosoft Windows
Section titled “Microsoft Windows”Choose an installation method:
Installing with the Microsoft Windows Installer package
Section titled “Installing with the Microsoft Windows Installer package”-
Double-click the Windows installation file you downloaded. The Liberica NIK Setup Wizard opens.
-
Click Next on the Welcome screen.
-
On the Custom Setup window, choose the features you need. Select a feature to see its description. In most cases, you can use the default setup. Click Disk Usage to see the available and required space on your disk. Click Next.
-
The package is ready to install. Press Install. If you see the User Account Control warning, verify the publisher (BELLSOFT) and click Yes.
-
After the installation is complete, click Finish to quit the Liberica NIK Setup Wizard.
If you want to install Liberica NIK silently, open the command line and run the following command:
msiexec /quiet /i bellsoft-liberica-vm-openjdk21.0.6+10-23.1.6+1-windows-amd64.msiLiberica NIK is installed to the C:\Program Files\BellSoft\LibericaNIK-23-OpenJDK-21 directory by default. For scripting purposes, we recommend adding the $NIK_HOME environment variable that points to your Liberica Native Image Kit installation directory.
Installing the standalone package on Microsoft Windows
Section titled “Installing the standalone package on Microsoft Windows”To install Liberica NIK as a standalone package on your computer, download the .zip package file and unpack it to a folder. You can also use Windows PowerShell to download and unpack the zip file as follows:
Invoke-WebRequest "https://download.bell-sw.com/vm/23.1.6/bellsoft-liberica-vm-openjdk21.0.6+10-23.1.6+1-windows-amd64.zip"Expand-Archive bellsoft-liberica-vm-openjdk21.0.6+10-23.1.6+1-windows-amd64.zip -DestinationPath .This unpacks Liberica NIK to the current directory. Either add the bin subdirectory to PATH, or remember this directory as the $NIK_HOME environment variable.
Installing with winget
Section titled “Installing with winget”winget carries Liberica NIK for JDK 21 (the NIK 23 line):
winget install -e --id BellSoft.LibericaNIK.23.JDK21Append --version <build> to pin a specific build; run winget show BellSoft.LibericaNIK.23.JDK21 for available versions.
Installing language packages on Windows
Section titled “Installing language packages on Windows”Open the command prompt and type:
"%NIK_HOME%\bin\gu.cmd" availableYou’ll see a list of available languages:
Downloading: Component catalog from download.bell-sw.comComponentId Version Component name Stability Origin-----------------------------------------------------------------------------icu4j 23.1.6 ICU4J Supported download.bell-sw.comjs 23.1.6 Graal.js Supported download.bell-sw.comllvm 23.1.6 LLVM Runtime Core Supported download.bell-sw.comllvm-toolchain 23.1.6 LLVM.org toolchain Supported download.bell-sw.comnodejs 23.1.6 Graal.nodejs Supported download.bell-sw.comregex 23.1.6 TRegex Supported download.bell-sw.comwasm 23.1.6 GraalWasm Experimental download.bell-sw.comExecute "%NIK_HOME%\bin\gu.cmd" install [language] to install a specific language. For example, "%NIK_HOME%\bin\gu.cmd" install nodejs.
Liberica NIK dependencies on Windows
Section titled “Liberica NIK dependencies on Windows”Start the x64 Native Tools Command Prompt to allow native-image and other utilities to find the development tools and work from the command prompt.
Verifying downloaded files
Section titled “Verifying downloaded files”It is a good practice to verify the downloaded installation file by comparing its size on your drive to the size on the Downloads page.
A more advanced approach is to obtain the checksum of the downloaded file in a command-line interface and compare it to the one you can find next to the Liberica NIK link on the Downloads page. Check the OS-specific commands below.
To get the checksum of the downloaded file, use the following command:
shasum -a 1 bellsoft-liberica-vm-openjdk21.0.6+10-23.1.6+1-macos-amd64.dmgTo get the checksum of the downloaded file, use the following command. The installation file extension depends on the Linux version.
shasum -a 1 bellsoft-liberica-vm-openjdk21.0.6+10-23.1.6+1-linux-amd64.debTo get the checksum of the downloaded file in the command line, run the following command in Windows PowerShell. To run PowerShell, open the Start menu or press the Windows key + R, type powershell in the Run dialog box, and click OK.
(Get-FileHash .\bellsoft-liberica-vm-openjdk21.0.6+10-23.1.6+1-windows-amd64.msi -Algorithm SHA1).Hash