How To Install javacc on CentOS 7

In this tutorial we learn how to install javacc on CentOS 7. javacc is A parser/scanner generator for java

Introduction

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

What is javacc

Java Compiler Compiler (JavaCC) is the most popular parser generator for use with Java applications. A parser generator is a tool that reads a grammar specification and converts it to a Java program that can recognize matches to the grammar. In addition to the parser generator itself, JavaCC provides other standard capabilities related to parser generation such as tree building (via a tool called JJTree included with JavaCC), actions, debugging, etc.

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

Install javacc on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

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

sudo yum -y install javacc

Install javacc 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 javacc using dnf by running the following command:

sudo dnf -y install javacc

How To Uninstall javacc on CentOS 7

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

sudo dnf remove javacc

References

Summary

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