Error when checking Java version: could not find java.dll

后端 未结 18 2206
长情又很酷
长情又很酷 2020-11-29 07:29

why do I get this? How can I fix it?

C:\\Users\\ash>java version
Error: Registry key \'Software\\JavaSoft\\Java Runtime Environment\'\\Cu         


        
18条回答
  •  囚心锁ツ
    2020-11-29 07:36

    This problem generally occurs in windows when your "Java Runtime Environment" registry entry is missing or mismatch with the installed JDK. The mismatch can be due to multiple JDKs.

    Steps to resolve:

    1. Open the Run window:

      Press windows+R

    2. Open registry window:

      Type "regedit" and enter.

    3. Go to: \HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\

    4. If Java Runtime Environment is not present inside JavaSoft, then create new Key and give the name Java Runtime Environment.

    5. For Java Runtime Environment create "CurrenVersion" string key and give appropriate version as value:

      JRE regedit entry

    6. Create a new subkey of 1.8.

    7. For 1.8 create a string key with name JavaHome with the value of JRE home:

      JRE regedit entry 2

    Ref: https://mybindirectory.blogspot.com/2019/05/error-could-not-find-javadll.html

提交回复
热议问题