How To Install byteman.noarch on Amazon Linux 2

In this tutorial we learn how to install byteman.noarch in Amazon Linux 2. byteman.noarch is Java agent-based bytecode injection tool

Introduction

In this tutorial we learn how to install byteman.noarch on Amazon Linux 2.

What is byteman.noarch

Byteman is a tool which simplifies tracing and testing of Java programs. Byteman allows you to insert extra Java code into your application, either as it is loaded during JVM startup or even after it has already started running. The injected code is allowed to access any of your data and call any application methods, including where they are private. You can inject code almost anywhere you want and there is no need to prepare the original source code in advance nor do you have to recompile, repackage or redeploy your application. In fact you can remove injected code and reinstall different code while the application continues to execute.

We can use yum to install byteman.noarch on Amazon Linux 2. In this tutorial we discuss both methods but you only need to choose one of method to install byteman.noarch.

Install byteman.noarch on Amazon Linux 2 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install byteman.noarch using yum by running the following command:

sudo yum -y install byteman.noarch

How To Uninstall byteman.noarch on Amazon Linux 2

To uninstall only the byteman.noarch package we can use the following command:

sudo yum remove byteman.noarch

byteman.noarch Package Contents on Amazon Linux 2

/usr/bin/bmcheck
/usr/bin/bminstall
/usr/bin/bmjava
/usr/bin/bmsubmit
/usr/share/byteman/bin
/usr/share/byteman/bin/bmcheck
/usr/share/byteman/bin/bminstall
/usr/share/byteman/bin/bmjava
/usr/share/byteman/bin/bmsubmit
/usr/share/byteman/lib
/usr/share/byteman/lib/byteman-bmunit.jar
/usr/share/byteman/lib/byteman-dtest.jar
/usr/share/byteman/lib/byteman-install.jar
/usr/share/byteman/lib/byteman-sample.jar
/usr/share/byteman/lib/byteman-submit.jar
/usr/share/byteman/lib/byteman.jar
/usr/share/doc/byteman-2.0.4
/usr/share/doc/byteman-2.0.4/ProgrammersGuide.pdf
/usr/share/doc/byteman-2.0.4/README
/usr/share/doc/byteman-2.0.4/copyright.txt
/usr/share/java/byteman
/usr/share/java/byteman/byteman-bmunit.jar
/usr/share/java/byteman/byteman-dtest.jar
/usr/share/java/byteman/byteman-install.jar
/usr/share/java/byteman/byteman-sample.jar
/usr/share/java/byteman/byteman-submit.jar
/usr/share/java/byteman/byteman.jar
/usr/share/maven-fragments/byteman
/usr/share/maven-poms/JPP.byteman-byteman-bmunit.pom
/usr/share/maven-poms/JPP.byteman-byteman-dtest.pom
/usr/share/maven-poms/JPP.byteman-byteman-install.pom
/usr/share/maven-poms/JPP.byteman-byteman-sample.pom
/usr/share/maven-poms/JPP.byteman-byteman-submit.pom
/usr/share/maven-poms/JPP.byteman-byteman.pom

References

Summary

In this tutorial we learn how to install byteman.noarch on Amazon Linux 2 using yum.