How To Install jna on CentOS 8
Introduction
In this tutorial we learn how to install jna
on CentOS 8.
What is jna
JNA provides Java programs easy access to native shared libraries (DLLs on Windows) without writing anything but Java code. JNA’s design aims to provide native access in a natural way with a minimum of effort. No boilerplate or generated code is required. While some attention is paid to performance, correctness and ease of use take priority.
We can use yum
or dnf
to install jna
on CentOS 8. In this tutorial we discuss both methods but you only need to choose one of method to install jna.
Install jna on CentOS 8 Using dnf
Update yum database with dnf
using the following command.
sudo dnf makecache --refresh
The output should look something like this:
CentOS Linux 8 - AppStream 43 kB/s | 4.3 kB 00:00
CentOS Linux 8 - BaseOS 65 kB/s | 3.9 kB 00:00
CentOS Linux 8 - ContinuousRelease 43 kB/s | 3.0 kB 00:00
CentOS Linux 8 - Extras 23 kB/s | 1.5 kB 00:00
CentOS Linux 8 - FastTrack 40 kB/s | 3.0 kB 00:00
CentOS Linux 8 - HighAvailability 36 kB/s | 3.9 kB 00:00
CentOS Linux 8 - Plus 24 kB/s | 1.5 kB 00:00
CentOS Linux 8 - PowerTools 50 kB/s | 4.3 kB 00:00
Extra Packages for Enterprise Linux Modular 8 - x86_64 13 kB/s | 9.2 kB 00:00
Extra Packages for Enterprise Linux 8 - x86_64 24 kB/s | 8.5 kB 00:00
Metadata cache created.
After updating yum database, We can install jna
using dnf
by running the following command:
sudo dnf -y install jna
Install jna on CentOS 8 Using yum
Update yum database with yum
using the following command.
sudo yum makecache --refresh
The output should look something like this:
CentOS Linux 8 - AppStream 43 kB/s | 4.3 kB 00:00
CentOS Linux 8 - BaseOS 65 kB/s | 3.9 kB 00:00
CentOS Linux 8 - ContinuousRelease 43 kB/s | 3.0 kB 00:00
CentOS Linux 8 - Extras 23 kB/s | 1.5 kB 00:00
CentOS Linux 8 - FastTrack 40 kB/s | 3.0 kB 00:00
CentOS Linux 8 - HighAvailability 36 kB/s | 3.9 kB 00:00
CentOS Linux 8 - Plus 24 kB/s | 1.5 kB 00:00
CentOS Linux 8 - PowerTools 50 kB/s | 4.3 kB 00:00
Extra Packages for Enterprise Linux Modular 8 - x86_64 13 kB/s | 9.2 kB 00:00
Extra Packages for Enterprise Linux 8 - x86_64 24 kB/s | 8.5 kB 00:00
Metadata cache created.
After updating yum database, We can install jna
using yum
by running the following command:
sudo yum -y install jna
How To Uninstall jna on CentOS 8
To uninstall only the jna
package we can use the following command:
sudo dnf remove jna
jna Package Contents on CentOS 8
/usr/lib/.build-id
/usr/lib/.build-id/03
/usr/lib/.build-id/03/a4b237632261f1a726e1d7ecf6ee1de55a602c
/usr/lib/java/jna
/usr/lib/java/jna.jar
/usr/lib/java/jna/jna.jar
/usr/lib64/jna
/usr/lib64/jna/libjnidispatch.so
/usr/share/doc/jna
/usr/share/doc/jna/CHANGES.md
/usr/share/doc/jna/OTHERS
/usr/share/doc/jna/README.md
/usr/share/doc/jna/TODO
/usr/share/java/jna.jar
/usr/share/java/jna.pom
/usr/share/licenses/jna
/usr/share/licenses/jna/AL2.0
/usr/share/licenses/jna/LGPL2.1
/usr/share/licenses/jna/LICENSE
/usr/share/maven-metadata/jna.xml
/usr/share/maven-poms/jna
/usr/share/maven-poms/jna.pom
/usr/share/maven-poms/jna/jna.pom
References
Summary
In this tutorial we learn how to install jna
on CentOS 8 using yum and dnf.