How To Install libjna-java on Kali Linux
Introduction
In this tutorial we learn how to install libjna-java
on Kali Linux.
What is libjna-java
libjna-java is:
JNA provides Java programs easy access to native shared libraries without writing anything but Java code - no JNI or native code is required. This functionality is comparable to Windows’ Platform/Invoke and Python’s ctypes. Access is dynamic at runtime without code generation.
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.
The JNA library uses a small native library stub to dynamically invoke native code. The developer uses a Java interface to describe functions and structures in the target native library. This makes it quite easy to take advantage of native platform features without incurring the high overhead of configuring and building JNI code for multiple platforms.
There are three methods to install libjna-java
on Kali Linux. We can use apt-get
, apt
and aptitude
. In the following sections we will describe each method. You can choose one of them.
Install libjna-java Using apt-get
Update apt database with apt-get
using the following command.
sudo apt-get update
After updating apt database, We can install libjna-java
using apt-get
by running the following command:
sudo apt-get -y install libjna-java
Install libjna-java Using apt
Update apt database with apt
using the following command.
sudo apt update
After updating apt database, We can install libjna-java
using apt
by running the following command:
sudo apt -y install libjna-java
Install libjna-java Using aptitude
If you want to follow this method, you might need to install aptitude on Kali Linux first since aptitude is usually not installed by default on Kali Linux. Update apt database with aptitude
using the following command.
sudo aptitude update
After updating apt database, We can install libjna-java
using aptitude
by running the following command:
sudo aptitude -y install libjna-java
How To Uninstall libjna-java on Kali Linux
To uninstall only the libjna-java
package we can use the following command:
sudo apt-get remove libjna-java
Uninstall libjna-java And Its Dependencies
To uninstall libjna-java
and its dependencies that are no longer needed by Kali Linux, we can use the command below:
sudo apt-get -y autoremove libjna-java
Remove libjna-java Configurations and Data
To remove libjna-java
configuration and data from Kali Linux we can use the following command:
sudo apt-get -y purge libjna-java
Remove libjna-java configuration, data, and all of its dependencies
We can use the following command to remove libjna-java
configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge libjna-java
Dependencies
libjna-java have the following dependencies:
References
Summary
In this tutorial we learn how to install libjna-java
package on Kali Linux using different package management tools: apt
, apt-get
and aptitude
.