aj command not found

In this troubleshooting guide we learn how to fix aj command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

aj: command not found

or when using sudo you get the following error message

sudo: aj: command not found

Solutions to aj: command not found

How To Fix aj: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu aj is provided by aspectj package.

aspectj is:

AspectJ enables the clean modularization of crosscutting concerns such as: error checking and handling, synchronization, context-sensitive behavior, performance optimizations, monitoring and logging, debugging support, multi-object protocols.

This package provides the CLI tools of aspectj (aj5, ajc, ajbrowser).

To fix this problem, we can install more using the command below.

sudo apt-get -y install aspectj

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install aspectj.

sudo apt -y install aspectj

Or if you have aptitude installed you can use the following command.

sudo aptitude install aspectj

Summary

In this tutorial we learn how to fix aj command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.