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

后端 未结 18 2176
长情又很酷
长情又很酷 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:58

    The accepted solution for Reinstalling ALL JDKs was a bit harsh. I too experienced this problem and here is my 2 cents:

    This problem started happening since I installed JDK 8 and still had JDK 6 installed. I need for different projects I'm working on.

    I noticed I had both a User and a System %JAVA_HOME%, so I removed my User %JAVA_HOME% variable and left only the system one.

    I also noticed that in my Oracle installation there was some Java executables and I believe those where the ones conflicting since both my Oracle and Java installations were in my %PATH% variable.

    I removed all Java paths from my %PATH% Variable and only left the %JAVA_HOME%\bin at the start of the variable for avoiding any conflicts with the Oracle installation.

提交回复
热议问题