Liberica JDK 8u382+6: Install Guide
1. Introduction
This guide describes how to install the Liberica product on Microsoft Windows, Linux, and macOS computers. The type of installation you choose depends on your requirements and the platform you use.
There are several Liberica distribution variants:
-
JDK Standard — use it to run, compile, and debug applications or create your own Java Runtime with a subset of Java modules;
-
JDK Full — includes LibericaFX and an extended set of VMs;
-
JDK Lite — install it if you are looking for a smaller footprint, yet fully functional JDK;
-
JRE Standard — use it to run Java applications;
-
JRE Full — includes LibericaFX and an extended set of VMs.
You can download Liberica 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 Liberica product you requested under Technologies. If you use the Liberica Download Center page, scroll down and select the OS, package type, and the distribution variant (JDK/JRE). After the download is completed, you can verify the downloaded file by comparing its size on your drive to the size on the Downloads page.
You can also use the command line to download the necessary installation packages as described further in this document.
Choose the OS below for specific installation instructions. Note that Liberica JDK is used for all examples below, but you can substitute it with Liberica JRE if necessary.
2. Microsoft Windows
Installing Liberica JDK using .msi file
-
Double click the Windows installation file you downloaded to run the installer. This opens the Liberica JDK Setup Wizard.
-
Click 'Next' on the Welcome screen.
-
On the Custom Setup window, choose 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 JDK Setup Wizard.
Note:
| The installer screens above may vary in different releases. |
Silent installation using .msi file
If you want to install Liberica JDK silently without any user interaction, open the command line and run the following command:
msiexec /i bellsoft-jdk8u382+6-windows-amd64.msi /qn /quiet /norestart /l*v "Liberica_install.log"
Where
-
/i
- install the specified software; -
/qn
- no UI; -
/quiet
- quiet mode without any user interaction; -
/norestart
- does not restart the computer after the installation is complete; -
/l*v "Liberica_install.log"
- verbose logging of all messages to the specified log file.
For the list of installation flags and options, run msiexec /help
from the command line.
Note:
| Use administrator account to run the installation in silent mode. |
Installing a standalone package from an archive
-
To install Liberica JDK 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/java/8u382+6/bellsoft-jdk8u382+6-windows-amd64.zip" Expand-Archive bellsoft-jdk8u382+6-windows-amd64.zip -DestinationPath .
The commands above download the archive from the BELLSOFT public domain and unpack Liberica JDK to the current directory. If you are a support-plan customer, log in to the support portal, copy the link to the Liberica product under Technologies and paste this link to the
Invoke-WebRequest
command above. -
Add
<Liberica JDK installation dir>/bin
subdirectory to the PATH and<Liberica JDK installation dir>
to the JAVA_HOME environment variables as follows.-
On the desktop or in File Explorer, right-click the Computer icon (This PC) and choose Properties on the context menu.
-
Click Advanced system settings.
-
Click Environment Variables.
-
Select 'Path' in System variables and click Edit.
-
Click New and type the path to the /bin subdirectory, for example:
C:/LibericaJDK8/bin/
Click OK when finished.
6) Select 'JAVA_HOME' in System variables and click Edit.
7) Delete the variable’s current value and type the path to the
<Liberica JDK installation dir>
subdirectory. Note that if you do not have the JAVA_HOME variable, click New under System variables and type JAVA_HOME in Variable name and type the path in Variable value.8) Click OK in open dialog boxes to save the changes and reopen Command prompt window for the changes to take effect.
-
To run your application, use the following command:
java -jar <your_application.jar>
Verifying your installation
To verify your installation, open a command-line interface, such as PowerShell or cmd, and run the following command:
java -version
You should see an output similar to the following:
openjdk version "1.8.0_382"
OpenJDK Runtime Environment (build 1.8.0_382-b06)
OpenJDK 64-Bit Server VM (build 25.382-b06, mixed mode)
Uninstalling Liberica JDK
Windows installer
If you installed Liberica JDK using Windows installation file (.msi), use the following procedure:
-
From the Windows Control Panel, open Programs > Programs and Features and select Liberica package you want to remove.
-
Click Uninstall.
Standalone package
To uninstall a standalone Liberica JDK package, remove its directory and related environmental variables in the Environment Variables dialog box.
3. Apple macOS
Installing Liberica JDK
To install Liberica JDK, perform the following:
-
Run the installer by double-clicking the
.dmg
file you downloaded. -
Double-click the Install Liberica JDK pkg icon to run the installation wizard.
-
Click Continue on the Welcome screen.
-
Click 'Install' to proceed with the default location.
Optionally, you can change the install location by clicking 'Change Install Location' on the Installation Type screen and selecting the location to install Liberica JDK.
If you chose to change the install location, select the destination drive and click 'Continue'.
-
Confirm new software installation. The file copying starts immediately.
-
Observe the installation progress.
-
Once the installation is complete, click 'Close' to quit the installation wizard.
Installing a standalone package from an archive
To install Liberica JDK as a standalone package, download the .zip
file and unpack it as in the following example.
wget https://download.bell-sw.com/java/8u382+6/bellsoft-jdk8u382+6-macos-amd64.zip
unzip bellsoft-jdk8u382+6-macos-amd64.zip
The commands above download the archive from the BELLSOFT public domain and unpack Liberica JDK to the current directory. If you are a support-plan customer, log in to the support portal, copy the link to the Liberica product under Technologies and paste this link to the wget
command above.
Include the path to the <Liberica installation dir>/bin
subdirectory when running your Java application as in the following example:
/Library/Java/JavaVirtualMachines/liberica-jdk-1.8.0_382.jdk/bin/java -jar <your_application.jar>
You can add the <Liberica installation dir>/bin
subdirectory to the $PATH and <Liberica installation dir>
to the JAVA_HOME environment variables for the current terminal session if necessary
export PATH=<Liberica installation dir>/bin:$PATH
export JAVA_HOME=<Liberica installation dir>
and run Liberica JDK as follows.
java -jar <your_application.jar>
Verifying your installation
To verify your installation, open the terminal and run the following command:
java -version
You should see an output similar to the following:
openjdk version "1.8.0_382"
OpenJDK Runtime Environment (build 1.8.0_382-b06)
OpenJDK 64-Bit Server VM (build 25.382-b06, mixed mode)
Uninstalling Liberica JDK
Package installer
To uninstall Liberica JDK using the package installer, perform the following:
-
Run the installer by double-clicking the
.dmg
file you downloaded. -
Double-click the Uninstall Liberica.app icon.
-
Click 'Continue' on the Welcome screen.
-
Select the Liberica installation you want to remove and click Continue.
-
Provide authentication information if necessary and click OK. Once the uninstallation is completed, click Exit to quit the wizard.
Command line
To uninstall Liberica application using the Terminal, do the following (assuming that you installed Liberica using the default location on the boot volume (/)).
-
To uninstall Liberica JRE, run the following commands in the terminal:
sudo pkgutil --volume / --forget com.bell-sw.liberica.jre.1.8.0_382 sudo rm -rf /Library/Java/JavaVirtualMachines/liberica-jre-1.8.0_382.jre
-
To uninstall Liberica JDK, run the following commands in the terminal:
sudo pkgutil --volume / --forget com.bell-sw.liberica.jdk.1.8.0_382 sudo rm -rf /Library/Java/JavaVirtualMachines/liberica-jdk-1.8.0_382.jdk
Note:
|
For Liberica JDK lite or full versions add -lite or -full respectively to the name, such as liberica-jdk-1.8.0_382-full.jdk .
|
Standalone package
To uninstall a standalone Liberica JDK package, remove its directory. Related environment variables set with the export
command are only valid for the current terminal session and they are removed once you close the terminal.
4. Linux
On most Linux versions, you can install new software using a repository, which is a storage location hosted on remote servers from which the system retrieves and installs software and updates. If the repository is not available or due to some other considerations, you can download and install new software manually.
Installing from repository
Alpine Linux Repository
To install Liberica JDK, perform the following.
-
Setup the repository.
echo "https://apk.bell-sw.com/main" | sudo tee -a /etc/apk/repositories sudo wget -P /etc/apk/keys/ https://apk.bell-sw.com/[email protected]
Note:sudo command may require entering administrator password. -
Install packages.
apk add bellsoft-java8
The following packages are available:
-
bellsoft-java8 contains the optimal build for most desktops/servers;
-
bellsoft-java8-lite includes Liberica JDK with compressed modules and Server VM, without any extra packages;
-
bellsoft-java8-runtime includes Liberica JRE only.
To use Liberica JDK, run the following command.
java -jar <your_application.jar>
APT Repository (.deb-based Linux distributions)
To install Liberica JDK, perform the following.
-
Add BELLSOFT official GPG key and set up the repository. Adding the GPG key is required only once on a computer.
wget -q -O - https://download.bell-sw.com/pki/GPG-KEY-bellsoft | sudo apt-key add - echo "deb https://apt.bell-sw.com/ stable main" | sudo tee /etc/apt/sources.list.d/bellsoft.list
Liberica JDK repositories contain all Linux architectures supported in the release: amd64, i386, arm64, armhf, ppc64le.
-
Update repositories and install packages. Type
Y
if a warning message about the installed packages appears.sudo apt-get update sudo apt-get install bellsoft-java8
The following packages are available:
-
bellsoft-java8 contains the optimal build for most desktops/servers;
-
bellsoft-java8-lite includes Liberica JDK with compressed modules and Server VM, without any extra packages;
-
bellsoft-java8-full contains the full Liberica JDK, including LibericaFX and a variety of JVMs for platforms which support it;
-
bellsoft-java8-runtime includes Liberica JRE only;
-
bellsoft-java8-runtime-full contains the full Liberica JRE, including LibericaFX.
To use Liberica JDK, run the following command.
java -jar <your_application.jar>
YUM Repository (.rpm-based Linux Distributions)
To install Liberica JDK, perform the following.
-
Set up the repository.
echo | sudo tee /etc/yum.repos.d/bellsoft.repo > /dev/null << EOF [BELLSOFT] name=BELLSOFT Repository baseurl=https://yum.bell-sw.com enabled=1 gpgcheck=1 gpgkey=https://download.bell-sw.com/pki/GPG-KEY-bellsoft priority=1 EOF
Liberica JDK repositories contain all Linux architectures supported in the release.
-
Update repositories and install packages.
sudo yum update sudo yum install bellsoft-java8
The following packages are available:
-
bellsoft-java8 contains the optimal build for most desktops/servers;
-
bellsoft-java8-lite includes Liberica JDK with compressed modules and Server VM, without any extra packages;
-
bellsoft-java8-full contains the full Liberica JDK, including LibericaFX and a variety of JVMs for platforms which support it;
-
bellsoft-java8-runtime includes Liberica JRE only;
-
bellsoft-java8-runtime-full contains the full Liberica JRE, including LibericaFX.
To use Liberica JDK, run the following command.
java -jar <your_application.jar>
YaST/Zypper Repository (SUSE Linux)
To install Liberica JDK, perform the following.
-
Set up the repository.
echo | sudo tee /etc/zypp/repos.d/repo-bellsoft.repo > /dev/null << EOF [BELLSOFT] name=BELLSOFT Repository baseurl=https://yum.bell-sw.com enabled=1 gpgcheck=1 gpgkey=https://download.bell-sw.com/pki/GPG-KEY-bellsoft priority=1 EOF
-
Update repositories and install packages.
sudo zypper up sudo zypper in bellsoft-java8
The following packages are available:
-
bellsoft-java8 contains the full Liberica JDK, including LibericaFX and a variety of JVMs for platforms that support it;
-
bellsoft-java8-lite includes Liberica JDK with compressed modules and Server VM, without any extra packages;
-
bellsoft-java8-full contains the full Liberica JDK, including LibericaFX and a variety of JVMs for platforms which support it;
-
bellsoft-java8-runtime includes Liberica JRE only;
-
bellsoft-java8-runtime-full contains the full Liberica JRE, including LibericaFX.
To use Liberica JDK, run the following command.
java -jar <your_application.jar>
Manual installation
The terminal commands in the examples below download an installation package from the BELLSOFT public domain. If you are a support-plan customer, log in to the support portal, copy the link to the Liberica product under Technologies and paste this link to the wget
command.
Alpine Linux
To install Liberica JDK, download the .apk package and install it with the following commands in the terminal.
-
Download the .apk package with the following command in the terminal.
wget https://download.bell-sw.com/java/8u382+6/bellsoft-jdk8u382+6-linux-x64-musl.apk
Or open the downloads page in the browser, scroll down, and download the required package.
-
Install the BELLSOFT official key as in the following example.
sudo wget -P /etc/apk/keys/ https://apk.bell-sw.com/[email protected]
-
Install this package with the following command.
apk add bellsoft-jdk8u382+6-linux-x64-musl.apk
To use Liberica JDK, run the following command.
java -jar <your_application.jar>
Ubuntu and other DEB-based OS’s
To install Liberica JDK, download the .deb package and install it with the following command in the terminal.
wget https://download.bell-sw.com/java/8u382+6/bellsoft-jdk8u382+6-linux-amd64.deb
sudo apt install ./bellsoft-jdk8u382+6-linux-amd64.deb
To use Liberica JDK, run the following command.
java -jar <your_application.jar>
This command automatically picks LibericaFX or DeviceIO dependencies if compiled into the JDK.
Red Hat Linux and other RPM-based OS’s using yum package manager
To install Liberica JDK, download the .rpm package and run the rpm tool as in the following example.
wget https://download.bell-sw.com/java/8u382+6/bellsoft-jdk8u382+6-linux-amd64.rpm
sudo yum install ./bellsoft-jdk8u382+6-linux-amd64.rpm
The commands above install Liberica JDK 8 package, including LibericaFX.
To use Liberica JDK, run the following command.
java -jar <your_application.jar>
This command automatically picks LibericaFX or DeviceIO dependencies when compiled into the JDK.
Manual RPM installation
-
Obtain BELLSOFT official GPG key and then import it as in the following example. Adding the GPG key is required only once on a computer.
wget -q -O - https://download.bell-sw.com/pki/GPG-KEY-bellsoft sudo rpm --import GPG-KEY-bellsoft
-
Download a package using the 'wget' command and install it as follows in the terminal.
wget https://download.bell-sw.com/java/8u382+6/bellsoft-jdk8u382+6-linux-amd64.rpm sudo rpm --install bellsoft-jdk8u382+6-linux-amd64.rpm
To use Liberica JDK, run the following command.
java -jar <your_application.jar>
Installing a standalone JDK package from an archive on GNU/Linux
To install Liberica JDK, download the .tar.gz package and unpack it as follows.
wget https://download.bell-sw.com/java/8u382+6/bellsoft-jdk8u382+6-linux-amd64.tar.gz
tar -zxf bellsoft-jdk8u382+6-linux-amd64.tar.gz
The commands above unpack Liberica JDK to the current directory. To run your Java application, use the following command:
<Liberica installation dir>/bin/java -jar <your_application.jar>
You can add the <Liberica installation dir>/bin
subdirectory to $PATH and <Liberica installation dir>
to JAVA_HOME for the current terminal session if necessary.
export PATH=<Liberica installation dir>/bin:$PATH
export JAVA_HOME=<Liberica installation dir>
After that run Liberica JDK as follows.
java -jar <your_application.jar>
Verifying your installation
To verify your installation, open a command-line interface and run the following command.
java -version
You should see an output similar to the following:
openjdk version "1.8.0_382"
OpenJDK Runtime Environment (build 1.8.0_382-b06)
OpenJDK 64-Bit Server VM (build 25.382-b06, mixed mode)
Uninstalling Liberica JDK
Alpine Linux
Run the following command.
sudo apk del <bellsoft-package-name>
Ubuntu and other DEB-based OS’s
Run the following command.
sudo apt remove <bellsoft-package-name>
Red Hat Linux and other RPM-based OS’s
Run the following command.
sudo yum remove <bellsoft-package-name>
Removing manually installed standalone packages
To uninstall a standalone Liberica JDK package, remove its directory. Related environment variables set with the export
command are only valid for the current terminal session and they are removed once you close the terminal.
5. Solaris
Installing standalone package on Solaris
To install Liberica JDK, download the .tar.gz package and unpack it as follows.
wget https://download.bell-sw.com/java/8u382+6/bellsoft-jdk8u382+6-solaris-x64.tar.gz
tar -zxf bellsoft-jdk8u382+6-solaris-x64.tar.gz
The commands above unpack Liberica JDK to the current directory. To run your Java application, use the following command.
<Liberica installation dir>/bin/java -jar <your_application.jar>
Uninstalling standalone package
To uninstall Liberica JDK, remove its directory.
6. 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 JDK link on the Downloads page. Check the OS-specific commands below.
Windows
To 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-jdk8u382+6-windows-amd64.msi -Algorithm SHA1).Hash
Apple macOS
To get the checksum of the downloaded file, use the following command.
shasum -a 1 bellsoft-jdk8u382+6-macos-amd64.dmg
Linux
To get the checksum of the downloaded file, use the following command. The installation file extension depends on the Linux version.
shasum -a 1 bellsoft-jdk8u382+6-linux-amd64.apk
7. Troubleshooting
This segment provides instructions to resolve some of the most common installation issues.
Checking system requirements
The JDK code can run on a number of platforms, using different compilers and build tools. We recommend checking your system compatibility and requirements on the Supported System Configurations page before installing Liberica product.
Microsoft Defender SmartScreen warnings
To ensure the security of the user’s computer, Microsoft Defender SmartScreen sometimes prevents running the downloaded files and triggers warnings while installing software.
If Microsoft Defender SmartScreen prevents installing the Liberica product and shows a message similar to the one below, follow the instructions in this section.
-
Verify the downloaded Liberica installation file as described in Verifying downloaded files.
-
Ensure that the installation file is signed by BELLSOFT by checking the details of the Digital Signatures in the Liberica installation file Properties.
-
Depending on the verification results, do the following:
-
If the size and checksum of the downloaded file matches those on the Downloads page and the file is signed by BELLSOFT, click More info on the Microsoft Defender SmartScreen window and then click Run anyway.
-
If any of the verified information is not correct, delete the file and download the Liberica installation file again.
-
Downloading Liberica JDK using Edge
If the Edge browser prevents saving the downloaded Liberica installation file, click More actions next to the downloaded file and select Keep to save the file.
Silent installation on Windows
If after running a silent installation the software is not installed, check your log file for error messages. If the log contains a message similar to the following, the issue is the lack of administrator rights of the account running the installation:
Error 1925. You do not have sufficient privileges to complete this installation for all users of the machine. Log on as administrator and then retry this installation.
Use administrator account for running silent installation.
Reverting to a previous Liberica product version on Windows
Important:
| We do not recommend installing previous versions of Liberica products, because they may contain security issues resolved in the latest release. |
If you have the latest version of a Liberica product installed and need to install some previous version of exactly the same product, first uninstall the current version and after that, install the version you need.
Off-screen rendering
On Linux systems, containerized deployments sometimes do some off-screen rendering, such as when preparing documents, forms, and images. When performing off-screen rendering, the JDK requires OS fonts and fontconfig
libraries to be installed. In case you do not have these libraries or fonts, you can encounter an exception similar to the one below:
Exception in thread "main" java.lang.InternalError: java.lang.reflect.InvocationTargetException
sun.font.fontmanager: sun.awt.X11FontManager
Exception in thread "main" java.lang.Error: Probable fatal error:No fonts found.
at sun.font.SunFontManager.getDefaultPhysicalFont(SunFontManager.java:1246)
at sun.font.SunFontManager.initialiseDeferredFont(SunFontManager.java:1110)
at sun.font.SunFontManager.findOtherDeferredFont(SunFontManager.java:1047)
at sun.font.SunFontManager.findDeferredFont(SunFontManager.java:1064)
at sun.font.SunFontManager.findFont2D(SunFontManager.java:2266)
On Linux systems, these libraries are provided by fontconfig and font packages, and, depending on the type of Linux, can be installed by running the following command.
-
Alpine Linux:
apk add fontconfig ttf-dejavu
-
Ubuntu:
apt install fontconfig fonts-dejavu
-
Fedora:
yum install fontconfig dejavu-sans-fonts dejavu-serif-fonts
-
Suse:
zypper install fontconfig dejavu-fonts
To run off-screen rendering by JDK without installing the fontconfig
package, do the following:
-
Install or copy required fonts to the system.
-
Check that
<jdk8u>/jre/lib
directory contains corresponding binary and sourcefontconfig.OS.[bfc|properties.src]
fontconfig configuration files. -
Ensure the source fontconfig configuration file contains correct paths to the fonts installed on the system.
Liberica JDK 8 contains predefined fontconfig.OS.[bfc|properties.src]
files for Ubuntu, Fedora, Suse, and Alpine Linux. If your target system is different from the one listed above, take one of fontconfig.OS.properties.src
files as a template, copy it to fontconfig.properties
file and update font paths in the file according to the paths on the target system.
For more information, see the Font Configuration Files document on the Oracle website.