Precondition
Describe the bug
If java is not on the PATH then the CLI fails on Windows, even though JAVA_HOME is correctly configured.
Version of dependency-check used
The problem occurs using version 12.2.2 of the cli
Log file
java : The term 'java' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ java
+ ~~~~
+ CategoryInfo : ObjectNotFound: (java:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Expected behavior
The script should check, and indeed prefer, JAVA_HOME to find the java executable.
Workaround
Adjust either PATH or JAVACMD variables before calling the script.
Precondition
Describe the bug
If
javais not on thePATHthen the CLI fails on Windows, even thoughJAVA_HOMEis correctly configured.Version of dependency-check used
The problem occurs using version 12.2.2 of the cli
Log file
Expected behavior
The script should check, and indeed prefer,
JAVA_HOMEto find the java executable.Workaround
Adjust either
PATHorJAVACMDvariables before calling the script.