How To Install xz-java on CentOS 7

In this tutorial we learn how to install xz-java on CentOS 7. xz-java is Java implementation of XZ data compression

Introduction

In this tutorial we learn how to install xz-java on CentOS 7.

What is xz-java

A complete implementation of XZ data compression in Java. It features full support for the .xz file format specification version 1.0.4, single-threaded streamed compression and decompression, single-threaded decompression with limited random access support, raw streams (no .xz headers) for advanced users, including LZMA2 with preset dictionary.

We can use yum or dnf to install xz-java on CentOS 7. In this tutorial we discuss both methods but you only need to choose one of method to install xz-java.

Install xz-java on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

After updating yum database, We can install xz-java using yum by running the following command:

sudo yum -y install xz-java

Install xz-java on CentOS 7 Using dnf

If you don’t have dnf installed you can install DNF on CentOS 7 first. Update yum database with dnf using the following command.

sudo dnf makecache

After updating yum database, We can install xz-java using dnf by running the following command:

sudo dnf -y install xz-java

How To Uninstall xz-java on CentOS 7

To uninstall only the xz-java package we can use the following command:

sudo dnf remove xz-java

References

Summary

In this tutorial we learn how to install xz-java on CentOS 7 using yum and dnf.