Follow these steps to find Java Installation path.
Steps 1: Execute below command
which java

Steps 2: Run the ll command with the directory path obtained from the previous command.
e.g. ll /usr/bin/java

Steps 3: Run the ll command with the directory path obtained from the previous command. This will reveal the path to the Java installation directory.
e.g. ll /etc/alternatives/java
