The following sections constitute a native image installation guide for Liberica NIK. It describes the experience of using native images in correspondence to different operating systems.
Apple macOS
Installing DMG bundle on Apple macOS
Open the Liberica NIK Download Center in your browser. Click ‘Download .DMG’ and start the download. After it is finished, check the file by comparing its size on your drive and the downloads page. A more advanced approach is to verify the checksum in the command line:
shasum -a 1 bellsoft-liberica-vm-openjdk17.0.6+10-22.3.1+1-macos-amd64.dmg
The checksum should match the one next to the link on the downloads page.
To run the installer, double-click on the file you have just downloaded.
Double-click on the pkg icon to open the Install Liberica NIK Wizard.
Click Continue.
Optionally, you can change the install location. Press ‘Change Install Location’ for that or ‘Install’ to proceed with the default location.
Allow new software installation. The file will start copying immediately.
Press ‘Close’ to dismiss the installation wizard.
Liberica NIK 22.3.1 is installed to the
/Library/Java/LibericaNativeImageKit/liberica-vm-22.3.1-openjdk11/
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-22.3.1-openjdk11/Contents/Home/
.
Installing ZIP bundle on macOS
To install Liberica NIK, download the .zip package.
curl -O https://download.bell-sw.com/vm/22.3.1/bellsoft-liberica-vm-openjdk17.0.6+10-22.3.1+1-macos-amd64.zip
After the download is finished, check the file by comparing its size on your drive and the downloads page. A more advanced approach is to verify the checksum in the command line:
shasum -a 1 bellsoft-liberica-vm-openjdk17.0.6+10-22.3.1+1-macos-amd64.zip
Now unpack it.
unzip bellsoft-liberica-vm-openjdk17.0.6+10-22.3.1+1-macos-amd64.zip
sudo mv bellsoft-liberica-vm-openjdk17.0.6+10-22.3.1+1 /Library/Java/LibericaNativeImageKit/
This will unpack Liberica NIK to
/Library/Java/LibericaNativeImageKit/
. Either add
Contents/Home/bin
subdirectory to $PATH
, or remember
/Library/Java/LibericaNativeImageKit/bellsoft-liberica-vm-openjdk17.0.6+10-22.3.1+1/Contents/Home/
as the $NIK_HOME
environment variable.
To uninstall Liberica NIK, simply remove this directory and unset the related environmental variables.
Installing language plugins on macOS
With the exception of the Core version (which comes bundled with native image plugin and does not allow the installation of additional components), all packages of Native Image Kit contain a component updater called gu. You can use it to install or update Native Image Kit plugins or add support for additional languages in the distribution.
Open the terminal and type:
$NIK_HOME/bin/gu available
You’ll see a list of available languages:
Downloading: Component catalog from download.bell-sw.com
ComponentId Version Component name Stability Origin
---------------------------------------------------------------------------------------------------------------------------------
llvm-toolchain 22.3.1 LLVM.org toolchain Supported download.bell-sw.com
nodejs 22.3.1 Graal.nodejs Supported download.bell-sw.com
python 22.3.1 Graal.Python Experimental download.bell-sw.com
R 22.3.1 FastR Experimental download.bell-sw.com
ruby 22.3.1 TruffleRuby Experimental download.bell-sw.com
wasm 22.3.1 GraalWasm Experimental download.bell-sw.com
Execute $NIK_HOME/bin/gu install [language]
to install a specific
language. For example, $NIK_HOME/bin/gu install python
.
This can be also executed manually:
curl -O https://download.bell-sw.com/vm/22.3.1/python-installable-openjdk11-22.3.1-macos-amd64.jar
$NIK_HOME/bin/gu -L install python-installable-openjdk11-22.3.1-macos-amd64.jar
If Liberica Native Image Kit was installed in
/Library/Java/LibericaNativeImageKit
or another location requiring
root privileges, you might have to use sudo
to perform
administrative tasks, such as installing additional components or
rebuilding the images.
Liberica NIK dependencies on macOS
xcode
is required for Liberica Native Image Kit. Install necessary
tools with the following command:
xcode-select --install
Linux
Installing DEB and RPM packages
Open the Liberica NIK Download Center in your browser. Click ‘Download .RPM’ or ‘Download .DEB’ and start the download. After it is finished, check the file by comparing its size on your drive and the downloads page. A more advanced approach is to verify the checksum in the command line:
shasum -a 1 bellsoft-liberica-vm-openjdk17.0.6+10-22.3.1+1-linux-amd64.deb
The checksum should match the one next to the link on the downloads page.
Install the package using the appropriate package manager. See our example for Apt:
sudo apt install ./bellsoft-liberica-vm-openjdk17.0.6+10-22.3.1+1-linux-amd64.deb
Or for an RPM-base system:
sudo yum install ./bellsoft-liberica-vm-openjdk17.0.6+10-22.3.1+1-linux-amd64.rpm
The package is installed to
/opt/bellsoft/liberica-vm-22.3.1-openjdk11/
.
For scripting purposes, it may be beneficial to add the ${NIK_HOME}
environment variable which would point to your Native Image Kit
installation directory.
Installing standalone NIK package on GNU/Linux
To install Liberica NIK, download the .tar.gz package.
wget https://download.bell-sw.com/vm/22.3.1/bellsoft-liberica-vm-openjdk17.0.6+10-22.3.1+1-linux-amd64.tar.gz
After the download is finished, check the file by comparing its size on your drive and the downloads page. A more advanced approach is to verify the checksum in the command line:
shasum -a 1 bellsoft-liberica-vm-openjdk17.0.6+10-22.3.1+1-linux-amd64.tar.gz
Unpack it with the following command.
export INSTALL_DIR=<your directory>
tar -C $INSTALL_DIR -xzf bellsoft-liberica-vm-openjdk17.0.6+10-22.3.1+1-linux-amd64.tar.gz
This will unpack Liberica NIK to the selected directory. Either add
$INSTALL_DIR/bellsoft-liberica-vm-openjdk17.0.6+10-22.3.1+1/bin
to
$PATH
, or remember
$INSTALL_DIR/bellsoft-liberica-vm-openjdk17.0.6+10-22.3.1+1
as the
$NIK_HOME
environment variable.
To uninstall Liberica NIK, simply remove this directory and unset the related environmental variables.
Installing language plugins on Linux
Open the terminal and type:
$NIK_HOME/bin/gu available
You’ll see a list of available languages:
Downloading: Component catalog from download.bell-sw.com
ComponentId Version Component name Stability Origin
---------------------------------------------------------------------------------------------------------------------------------
llvm-toolchain 22.3.1 LLVM.org toolchain Supported download.bell-sw.com
nodejs 22.3.1 Graal.nodejs Supported download.bell-sw.com
python 22.3.1 Graal.Python Experimental download.bell-sw.com
R 22.3.1 FastR Experimental download.bell-sw.com
ruby 22.3.1 TruffleRuby Experimental download.bell-sw.com
wasm 22.3.1 GraalWasm Experimental download.bell-sw.com
Execute $NIK_HOME/bin/gu install [language]
to install specific
language. For example, $NIK_HOME/bin/gu install python
.
This can be also executed manually:
wget https://download.bell-sw.com/vm/22.3.1/python-installable-openjdk11-22.3.1-linux-amd64.jar
$NIK_HOME/bin/gu -L install python-installable-openjdk11-22.3.1-linux-amd64.jar
If Liberica Native Image Kit was installed via a package manager or in a
location requiring root privileges, you might have to use sudo
to
perform administrative tasks, such as installing additional components
or rebuilding the images.
Liberica NIK dependencies on Linux
Several libraries are required for Liberica Native Image Kit on Linux systems. It is possible to install these libraries on Debian-based systems with the following command:
sudo apt install g++ make zlib1g-dev
Installable components also have dependencies on additional libraries.
Truffleruby depends on libssl-dev
, and FastR depends on
libgfortran4
.
You can use a similar command to install dependencies on rpm-based systems. See this example for CentOS:
sudo yum install gcc-c++ make zlib-devel
Other types of Linux systems may require different packages.
Alpine Linux
Installing APK package on Alpine Linux
Open the Liberica NIK Download Center in your browser. Click ‘Download .DMG’ and start the download. After it is finished, check the file by comparing its size on your drive and the downloads page. A more advanced approach is to verify the checksum in the command line:
shasum -a 1 bellsoft-liberica-vm-openjdk17.0.6+10-22.3.1+1-linux-x64-musl.apk
The checksum should match the one next to the link on the downloads page.
Install the package using the appropriate package manager. See our example for Apt:
# Add public key to check signature
wget -P /etc/apk/keys/ https://apk.bell-sw.com/[email protected]
# Install package
sudo apk add ./bellsoft-liberica-vm-openjdk17.0.6+10-22.3.1+1-linux-x64-musl.apk
The package is installed to
/opt/bellsoft/liberica-vm-22.3.1-openjdk11/
.
For scripting purposes, it may be beneficial to add the ${NIK_HOME}
environment variable which would point to your Native Image Kit
installation directory.
Installing standalone NIK package on Alpine Linux
To install Liberica NIK, download the .tar.gz package.
wget https://download.bell-sw.com/vm/22.3.1/bellsoft-liberica-vm-openjdk17.0.6+10-22.3.1+1-linux-x64-musl.tar.gz
After the download is finished, check the file by comparing its size on your drive and the downloads page. A more advanced approach is to verify the checksum in the command line:
shasum -a 1 bellsoft-liberica-vm-openjdk17.0.6+10-22.3.1+1-linux-x64-musl.tar.gz
Unpack it with the following command.
export INSTALL_DIR=<your directory>
tar -C $INSTALL_DIR -xzf bellsoft-liberica-vm-openjdk17.0.6+10-22.3.1+1-linux-x64-musl.tar.gz
This will unpack Liberica NIK to the selected directory. Either add
$INSTALL_DIR/bellsoft-liberica-vm-openjdk17.0.6+10-22.3.1+1/bin
to
$PATH
, or remember
$INSTALL_DIR/bellsoft-liberica-vm-openjdk17.0.6+10-22.3.1+1
as the
$NIK_HOME
environment variable.
To uninstall Liberica NIK, simply remove this directory and unset the related environmental variables. This concludes the native image Alpine Linux example.
Installing language plugins on Alpine Linux
Open the terminal and type:
$NIK_HOME/bin/gu available
You’ll see a list of available languages:
Downloading: Component catalog from download.bell-sw.com
ComponentId Version Component name Stability Origin
---------------------------------------------------------------------------------------------------------------------------------
llvm-toolchain 22.3.1 LLVM.org toolchain Supported download.bell-sw.com
nodejs 22.3.1 Graal.nodejs Supported download.bell-sw.com
python 22.3.1 Graal.Python Experimental download.bell-sw.com
R 22.3.1 FastR Experimental download.bell-sw.com
ruby 22.3.1 TruffleRuby Experimental download.bell-sw.com
wasm 22.3.1 GraalWasm Experimental download.bell-sw.com
Execute $NIK_HOME/bin/gu install [language]
to install specific
language. For example, $NIK_HOME/bin/gu install python
.
This can be also executed manually:
wget https://download.bell-sw.com/vm/22.3.1/python-installable-openjdk11-22.3.1-linux-x64-musl.jar
$NIK_HOME/bin/gu -L install python-installable-openjdk11-22.3.1-linux-x64-musl.jar
If Liberica Native Image Kit was installed via a package manager or in a
location requiring root privileges, you might have to use sudo
to
perform administrative tasks, such as installing additional components
or rebuilding the images.
Liberica NIK dependencies on Alpine Linux
Several libraries are required for Liberica Native Image Kit on Alpine Linux. It is possible to install these libraries with the following command:
sudo apk add bash g++ make zlib-static
Installable components also have dependencies on additional libraries.
Truffleruby depends on openssl-dev
, and FastR depends on
libgfortran
.
Microsoft Windows
Installing with Microsoft Windows Installer package
Open the Liberica NIK Download Center in your browser. Click ‘Download .MSI’ and start the download. After it is finished, check the file by comparing its size on your drive and the downloads page. A more advanced approach is to verify the checksum in PowerShell:
(Get-FileHash .\bellsoft-liberica-vm-openjdk17.0.6+10-22.3.1+1-windows-amd64.msi -Algorithm SHA1).Hash
The checksum should match the one next to the link on the downloads page.
To run the installer, double-click on the file you have just downloaded. This will open the Liberica NIK Setup Wizard.
Press ‘Next’ on the welcome screen.
Choose features you need and press ‘Next’. Select a feature to see the description. If in doubt, skip this step and press ‘Next’.
The package is ready to install, press ‘Install’.
-
Please note that the installer screens above may vary for different releases.
If you want to install Liberica NIK silently, open the command line and run the following command:
msiexec /quiet /i bellsoft-liberica-vm-openjdk17.0.6+10-22.3.1+1-windows-amd64.msi
Liberica NIK is installed to the
C:\Program Files\BellSoft\LibericaNIK-21-OpenJDK-11
directory by
default. For scripting purposes, it may be beneficial to add the
$NIK_HOME
environment variable which would point to your Native
Image Kit installation directory.
Installing standalone package on Microsoft Windows
To install Liberica NIK, download the .zip package and unpack it.
If you do not want to or cannot do it via GUI, use PowerShell:
(New-Object System.Net.WebClient).DownloadFile("https://download.bell-sw.com/vm/22.3.1/bellsoft-liberica-vm-openjdk17.0.6+10-22.3.1+1-windows-amd64.zip", "liberica.zip")
Expand-Archive liberica.zip -DestinationPath .
This will unpack Liberica NIK to the current directory. Either add bin
subdirectory to PATH
, or remember this directory as the
$NIK_HOME
environment variable.
Installing language plugins on Windows
Open the terminal and type:
"%NIK_HOME%\bin\gu.cmd" available
You’ll see a list of available languages:
Downloading: Component catalog from download.bell-sw.com
ComponentId Version Component name Stability Origin
---------------------------------------------------------------------------------------------------------------------------------
nodejs 22.3.1 Graal.nodejs Supported download.bell-sw.com
wasm 22.3.1 GraalWasm Experimental download.bell-sw.com
Execute "%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
Microsoft Visual Studio 2017 with Microsoft Visual C++ (MSVC) 15 or later is required for Liberica Native Image Kit.
Start x64 Native Tools Command Prompt
to allow native-image
and
other utilities to find development tools and work from command prompt.