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

后端 未结 18 2044
长情又很酷
长情又很酷 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:33
    1. rename file "C:\Windows\System32\java.exe" to "C:\Windows\System32\java_old.exe"
    2. CMD --> java -version

    done.

    0 讨论(0)
  • 2020-11-29 07:35

    I had a similar issue after installing the java 1.8.

    To fix this go to Advance System setting --> path and remove

    C:\ProgramData\Oracle\Java\javapath;

    0 讨论(0)
  • 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

    0 讨论(0)
  • 2020-11-29 07:37

    I edited my path to put the Oracle JDK at the start of the path and that fixed it.

    0 讨论(0)
  • 2020-11-29 07:38

    If you face this error in cmd with another error as "could not find runtime environment" after you have done all settings in Environment Variable. Then you just need to run jre.exe in your jdk folder and reinstall it and then recheck it by java -version command. Hope it will help you.

    0 讨论(0)
  • 2020-11-29 07:38

    after adding the requirements path as illustrated up and deleting C:\ProgramData\Oracle\Java\javapath;. don't forget to reopen your editor.

    0 讨论(0)
提交回复
热议问题