find location of the command

whereis java

Uses

  1. To know that the intended version of the library is in path.