jjtree4 command not found
Introduction
When you run more command in linux terminal / console, you get the following error message
jjtree4: command not found
or when using sudo you get the following error message
sudo: jjtree4: command not found
Solutions to jjtree4: command not found
How To Fix jjtree4: command not found in Ubuntu / Debian / Kali Linux / Raspbian
In Ubuntu jjtree4 is provided by javacc4 package.
javacc4 is:
Java Compiler-Compiler (JavaCC) is (according to sun) “the most popular parser generator” for use with Java [tm] 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.
To fix this problem, we can install more using the command below.
sudo apt-get -y install javacc4
This command might take some time to finish depending on your machine internet connection.
You can also use apt command to install javacc4.
sudo apt -y install javacc4
Or if you have aptitude installed you can use the following command.
sudo aptitude install javacc4
Summary
In this tutorial we learn how to fix jjtree4 command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.