How To Install libxstream-java on Debian 9

In this tutorial we learn how to install libxstream-java on Debian 9. libxstream-java is Java library to serialize objects to XML and back again

Introduction

In this tutorial we learn how to install libxstream-java on Debian 9.

What is libxstream-java

libxstream-java is:

The features of the XStream library are:

  • Ease of use. A high level facade is supplied that simplifies common use cases.
  • No mappings required. Most objects can be serialized without need for specifying mappings.
  • Performance. Speed and low memory footprint are a crucial part of the design, making it suitable for large object graphs or systems with high message throughput.
  • Clean XML. No information is duplicated that can be obtained via reflection. This results in XML that is easier to read for humans and more compact than native Java serialization.
  • Requires no modifications to objects. Serializes internal fields, including private and final. Supports non-public and inner classes. Classes are not required to have default constructor.
  • Full object graph support. Duplicate references encountered in the object-model will be maintained. Supports circular references.
  • Integrates with other XML APIs. By implementing an interface, XStream can serialize directly to/from any tree structure (not just XML).
  • Customizable conversion strategies. Strategies can be registered allowing customization of how particular types are represented as XML.
  • Error messages. When an exception occurs due to malformed XML, detailed diagnostics are provided to help isolate and fix the problem.
  • Alternative output format. The modular design allows other output formats. XStream ships currently with JSON support and morphing.

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

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

sudo apt-get -y install libxstream-java

Install libxstream-java Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install libxstream-java

Install libxstream-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 libxstream-java using aptitude by running the following command:

sudo aptitude -y install libxstream-java

How To Uninstall libxstream-java on Debian 9

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

sudo apt-get remove libxstream-java

Uninstall libxstream-java And Its Dependencies

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

sudo apt-get -y autoremove libxstream-java

Remove libxstream-java Configurations and Data

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

sudo apt-get -y purge libxstream-java

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

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

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

Dependencies

libxstream-java have the following dependencies:

References

Summary

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