A developer gets the error message "One Network SDK NEO requires JDK 12" when installing the SDK, even though JDK 12 is installed on their computer. What is the best way to resolve this issue?
Sometimes developers have multiple versions of JDK installed on their computer. As a result, their PC's PATH environment variable may include the locations of different JDK versions.
The following is an example PATH environment variable:
echo %PATH%
C:ProgramDataDockerDesktopversion-bin;C:Program
FilesDockerDockerResourcesin;C:Program
Files (x86)InteliCLS
Client;C:Program FilesInteliCLS
Client;C:ProgramDataOracleJavajavapath;C:WINDOWSsystem32;C:WINDOWS;C:WINDOWSSystem32Wbem;C:WINDOWSSystem32WindowsPowerShellv1.0;C:Program
Files (x86)IntelIntel(R) Management
Engine ComponentsDAL;C:Program
FilesIntelIntel(R) Management Engine
ComponentsDAL;C:Program Files
(x86)IntelIntel(R) Management Engine
ComponentsIPT;C:Program
FilesIntelIntel(R) Management Engine
ComponentsIPT;C:WINDOWSSystem32OpenSSH;C:Program
FilesJavajdk-12.0.2in;C:UsersUserNameAppDataLocalMicrosoftWindowsApps;
In this example, different versions of JDK are included in the PATH separately:
Removing the first entry from PATH resolves the issue.
Not only PATH should contain bin directory from JDK 12 but JAVA_HOME env variable should also point to JDK 12 installation dir.