Registry key Error: Java version has value '1.8', but '1.7' is required

前端 未结 27 2315
星月不相逢
星月不相逢 2020-11-30 20:30

While running

sencha app build production

I am getting the following error:

Error: Registry key \'Software\\JavaSof

相关标签:
27条回答
  • 2020-11-30 20:52

    My short contribution, for sharing the same problem with Talend Open Studio 64 bit version.

    1. Launch ..\TOS_DI-Win32-20150702_1326-V6.0.0\TOS_DI-win-x86_64.exe manually (not link an startup Windows menu)
    2. and this registry error message appears

    To resolve this, remove all java.exe, javaw.exe and javaws.exe files on c:\ProgramData\Oracle\Java\javapath\

    and TOS start with 64 bits version correctly !

    0 讨论(0)
  • 2020-11-30 20:52

    just did this and it worked

    HKLM > SOFTWARE > JavaSoft > Java Runtime Environment

    just manually change current version to 1.7 .

    lol ... but it worked!

    0 讨论(0)
  • 2020-11-30 20:54

    As for me on win7 64bit.

    Copy the java.exe javaw.exe javaws.exe in the folder C:\Program Files\Java\jre1.8.0_91\bin to the C:\Windows\System32.

    and then open cmd, type java -version.

    C:\Users\HEcom>java -version
    java version "1.8.0_91"
    Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
    Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)
    

    Before the above make sure the Registry's CurrentVersion is 1.8

    In the START menu type "regedit" to open the Registry editor

    1. Go to "HKEY_LOCAL_MACHINE" on the left-hand side registry explorer/tree menu
    2. Click "SOFTWARE" within the "HKEY_LOCAL_MACHINE" registries
    3. Click "JavaSoft" within the "SOFTWARE" registries
    4. Click "Java Runtime Environment" within the "JavaSoft" list of registries here you can see different versions of installed java
    5. Click "Java Runtime Environment"- On right hand side you will get 4-5 rows . Please select "CurrentVersion" and right Click( select modify option) make sure the version is "1.8"
    0 讨论(0)
  • 2020-11-30 20:55

    Just Install Java SE Runtime Environment JRE 7 !

    Now you see "java 7" & "java 8" in "Programs and Features" in the "Control Panel"

    It worked for me.

    0 讨论(0)
  • 2020-11-30 20:56

    My experience:

    I am using windows 8.1 and i have downgraded JAVA version from 1.8 to 1.7 and i was getting the same error.

    Error: Registry key 'Software\JavaSoft\Ja has value '1.7', but '1.8' is required.

    I have deleted java.exe, javaw.exe and javaws.exe from C:\Windows\System32 folder and it worked for me.

    0 讨论(0)
  • 2020-11-30 20:57

    The error is explicit ...

    Error: Registry key 'Software\JavaSoft\Java Runtime Environment'\CurrentVersion' has value '1.8', but '1.7' is required.

    Error: could not find java.dll

    Error: Could not find Java SE Runtime Environment.

    ... you are attempting to use the java.exe 1.7 executable while the HKEY_LOCAL_MACHINE\Software\JavaSoft\Java Runtime Environment > CurrentVersion registry key has the value 1.8.

    The recurring theme to proposed solutions is that the error is a configuration error. The error can be solved in various different manners (e.g. reconfiguration of the users environment or removal of java executables with fingers-crossed and hope that there exists another fallback java.exe in the users %PATH% and that the fallback java.exe is the correct executable).

    The correct solution depends on what you're trying to achieve: "are you trying to downgrade from jdk-8 to jdk-7? Are trying to upgrade to jdk-8? ..."

    Reproduction steps

    1. install jdk-7u80-windows-x64.exe

    notes:

    • the java.exe executable available in the users %PATH% is installed in C:\Windows\System32
    • the installation does not update the users %PATH%
    • the HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment > CurrentVersion string registry entry is created (among others) with the value 1.7
    1. install jdk-8u191-windows-x64.exe

    notes:

    • the users %PATH% is updated to include C:\Program Files (x86)\Common Files\Oracle\Java\javapath as the first entry
    • the the HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment > CurrentVersion string registry entries value is updated to 1.8
    1. update the users %PATH% environment variable, remove C:\Program Files (x86)\Common Files\Oracle\Java\javapath

    2. in a new command prompt java -version

    Error: Registry key 'Software\JavaSoft\Java Runtime Environment'\CurrentVersion' has value '1.8', but '1.7' is required.

    Error: could not find java.dll

    Error: Could not find Java SE Runtime Environment.

    Solution(s)

    1. OP's solution https://stackoverflow.com/a/29769311/1423507 is a "fingers-crossed and hope that there exists a fallback java.exe in the users %PATH% and that the fallback executable is correct" approach to the error. Given the reproduction steps, removing the java.exe, javaw.exe and javaws.exe executables from C:\Windows\System32 (only in my case) will result in no longer having any java.exe present in the users %PATH% resulting in the error 'java' is not recognized as an internal or external command, operable program or batch file. which is not so much of a solution.

    2. answers https://stackoverflow.com/a/35775493/1423507 and https://stackoverflow.com/a/36516620/1423507 work however you're reverting to using java.exe 1.7 (e.g. update the CurrentVersion registry key's value to match the java.exe version found in the users %PATH%).

    3. make surejava.exe 1.8 is the first found in the users %PATH% (how you do that is irrelevant) i.e.:

      • update the users %PATH% to include C:\Program Files (x86)\Common Files\Oracle\Java\javapath first (ensure that the executables in that directory are correct)
      • update the users %PATH% to include the absolute path of your java binaries first (set PATH="C:\Program Files\Java\jre1.8.0_191\bin;%PATH%")
      • set java specific environment variables and update the users %PATH% with them (set JAVA_HOME="C:\Program Files\Java"; set JRE_HOME=%JAVA_HOME%\jre1.8.0_191; set PATH=%JRE_HOME%\bin;%PATH%)
    0 讨论(0)
提交回复
热议问题