To see the file invoked by the java
command, use which java
, although this will often be just a symbolic link to the real executable, for example /usr/bin/java
. As far as I know, this works on all distributions.
On some Linux distributions, you can use update-alternatives --display java
(possibly with sudo
) to see a list of all the java executables installed on your system and also tell you which symbol the link refers to. You can switch between them using the --config
option.
source share