- I've removed all ancient Java 8 install on my computer.
- I've downloaded latest openjdk 11 from https://jdk.java.net/11/ and extracted the content to
I've setup system environment variable to
JAVA_HOME = C:\Program Files\Java\jdk-11.0.1
In a command prompt
> java -versionreturns:
Error: opening registry key 'Software\JavaSoft\Java Runtime Environment' Error: could not find java.dll Error: Could not find Java SE Runtime Environment.
How to make it work:
Windows > Start > cmd >
C:> for %i in (javac.exe) do @echo. %~$PATH:i
C:> where java
C:\ProgramData\Oracle\Java\javapath folder which contain:
Browse to this folder with Windows file explorer and remove everything (three files above).
Close and reopen cmd (Windows > Start > cmd >)
C:> java -version
Should now return:
openjdk version "11.0.1" 2018-10-16
OpenJDK Runtime Environment 18.9 (build 11.0.1+13)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.1+13, mixed mode)
or something similar depending on which java release package you've downloaded...
I came across same issue,
how to check:
- open cmd, execute "where java" (without quote)
- you should see more than one output of the java path, one of it should be the one you set "C:\Program Files\Java\jdk-11.0.1\bin", the other ones should be in above
how to solve:
simply delete all the other java path
check your enviroment variable setting, move your %JAVA_HOME%\bin to the above all the other java path