How To Install bsh on CentOS 7

In this tutorial we learn how to install bsh on CentOS 7. bsh is Lightweight Scripting for Java

Introduction

In this tutorial we learn how to install bsh on CentOS 7.

What is bsh

BeanShell is a small, free, embeddable, Java source interpreter with object scripting language features, written in Java. BeanShell executes standard Java statements and expressions, in addition to obvious scripting commands and syntax. BeanShell supports scripted objects as simple method closures like those in Perl and JavaScript(tm). You can use BeanShell interactively for Java experimentation and debugging or as a simple scripting engine for your applications. In short interpreted Java, plus some useful stuff. Another way to describe it is to say that in many ways BeanShell is to Java as Tcl/Tk is to C Java applications to execute Java code dynamically at run-time or to provide scripting extensibility for your applications. Alternatively, you can call your Java applications and objects from BeanShell; working with Java objects and APIs dynamically. Since BeanShell is written in Java and runs in the same space as your application, you can freely pass references to “real live” objects into scripts and return them as results.

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

Install bsh on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

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

sudo yum -y install bsh

Install bsh on CentOS 7 Using dnf

If you don’t have dnf installed you can install DNF on CentOS 7 first. Update yum database with dnf using the following command.

sudo dnf makecache

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

sudo dnf -y install bsh

How To Uninstall bsh on CentOS 7

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

sudo dnf remove bsh

References

Summary

In this tutorial we learn how to install bsh on CentOS 7 using yum and dnf.