How To Install jdom2 on Fedora 34

jdom2 is Java manipulation of XML made easy

Introduction

In this tutorial we learn how to install jdom2 on Fedora 34.

What is jdom2

JDOM is a Java-oriented object model which models XML documents. It provides a Java-centric means of generating and manipulating XML documents. While JDOM inter-operates well with existing standards such as the Simple API for XML (SAX) and the Document Object Model (DOM), it is not an abstraction layer or enhancement to those APIs. Rather, it seeks to provide a robust, light-weight means of reading and writing XML data without the complex and memory-consumptive options that current API offerings provide.

We can use yum or dnf to install jdom2 on Fedora 34. In this tutorial we discuss both methods but you only need to choose one of method to install jdom2.

Install jdom2 on Fedora 34 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

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

sudo dnf -y install jdom2

Install jdom2 on Fedora 34 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

After updating yum database, We can install jdom2 using yum by running the following command:

sudo yum -y install jdom2

How To Uninstall jdom2 on Fedora 34

To uninstall only the jdom2 package we can use the following command:

sudo dnf remove jdom2

jdom2 Package Contents on Fedora 34

/usr/share/doc/jdom2
/usr/share/doc/jdom2/CHANGES.txt
/usr/share/doc/jdom2/COMMITTERS.txt
/usr/share/doc/jdom2/README.txt
/usr/share/doc/jdom2/TODO.txt
/usr/share/java/jdom2
/usr/share/java/jdom2/jdom2-contrib.jar
/usr/share/java/jdom2/jdom2-junit.jar
/usr/share/java/jdom2/jdom2.jar
/usr/share/licenses/jdom2
/usr/share/licenses/jdom2/LICENSE.txt
/usr/share/maven-metadata/jdom2.xml
/usr/share/maven-poms/jdom2
/usr/share/maven-poms/jdom2/jdom2-contrib.pom
/usr/share/maven-poms/jdom2/jdom2-junit.pom
/usr/share/maven-poms/jdom2/jdom2.pom

References

Summary

In this tutorial we learn how to install jdom2 on Fedora 34 using yum and dnf.