cmd.env: better java home detecting