The documentation states
[...] command, a list of lines that designates the external executable file of the program, and its arguments, if any. Which string lists represent a valid operating system command depends on the system. [...]
Which essentially means that where it searches for executable programs depends on the specific system and JVM you are working on.
I canโt find the full JVM / System behavior matrix, but, presumably, it behaves similarly to the popular shells of the system ( bash for * nix and cmd for windows), that is, it looks from the directories in PATH for the environment variable from left to right and executes the first executable file, which he finds.
source share