How To Install libjmock-java on Debian 10

Learn how to install libjmock-java on Debian 10 with this tutorial. libjmock-java is Java library for testing code with mock objects

Introduction

In this tutorial we learn how to install libjmock-java on Debian 10.

What is libjmock-java

libjmock-java is:

JMock is a library that supports test-driven development of Java code with mock objects.

Mock objects help you design and test the interactions between the objects in your programs.

There are three methods to install libjmock-java on Debian 10. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install libjmock-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 libjmock-java using apt-get by running the following command:

sudo apt-get -y install libjmock-java

Install libjmock-java Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install libjmock-java

Install libjmock-java Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Debian. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install libjmock-java using aptitude by running the following command:

sudo aptitude -y install libjmock-java

How To Uninstall libjmock-java on Debian 10

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

sudo apt-get remove libjmock-java

Uninstall libjmock-java And Its Dependencies

To uninstall libjmock-java and its dependencies that are no longer needed by Debian 10, we can use the command below:

sudo apt-get -y autoremove libjmock-java

Remove libjmock-java Configurations and Data

To remove libjmock-java configuration and data from Debian 10 we can use the following command:

sudo apt-get -y purge libjmock-java

Remove libjmock-java configuration, data, and all of its dependencies

We can use the following command to remove libjmock-java configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge libjmock-java

Dependencies

libjmock-java have the following dependencies:

References

Summary

In this tutorial we learn how to install libjmock-java package on Debian 10 using different package management tools: apt, apt-get and aptitude.