anchor.diff:  :: are installed by default under %ProgramFiles% and %ProgramFiles(x86)%.
   ::
   :: %~1 - one of them: jdk or jre
  +
   :shellenv.lookup.java
  +
   set "%~1_HOME="
   for /f %%d in ( '
   	dir /b "%ProgramFiles%\Java" "%ProgramFiles(x86)%\Java" 2^>nul ^| findstr "%~1" ^| sort
  
positive.code: :: %~1 - home name variable (looks like XXX_HOME)
  :: %~2 - the directory's path
  :: %~3 - /P to force prepending to %PATH%, or empty
  :shellenv.set.home
  if defined %~1 goto :EOF
  
  :: Set all provided paths to %PATH%
  
negative.code: ::
  :: %~1 - the directory's path
  :: %~2 - /P to force prepending to %PATH%, or empty
  
  :shellenv.set.path
  
  :: Check if the path is not specified in %PATH% and contains executables
  call :shellenv.check.path "%~1" || goto :EOF
  
  