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

前端 未结 27 2316
星月不相逢
星月不相逢 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:38

    Unistall Java 8 from your program list. BY following below steps:-

    From your desktop, click on the Start Menu (or Start ball) at the lower left of your screen. Go to the Control Panel. Click on Programs and Features. Select Java8 and click Uninstall

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

    In my case (Windows 7 64-bit), I just did the following:

    • Removed the reference to C:\ProgramData\Oracle\Java\javapath; from the Path environment variable
    • Removed files java, javaw and javaws from the C:\Windows\System32 folder

    Afterwards, I closed all open command line consoles, reopened them and ran java -version.

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

    re: Windows users

    No. Don't remove the Javapath environment reference from your PATH variable.

    The reason why the registry didn't work is that the Oracle Javapath script needs to run in the PATH sequence ahead of the JRE & JDK directories - it will sort out the current version:

    put this directory at the HEAD of your %PATH% variable:

    C:\ProgramData\Oracle\Java\javapath
    

    [or wherever it is on your desktop]

    so your PATH will look something like this - mine for example

    PATH=C:\ProgramData\Oracle\Java\javapath;<other path directories>;E:\Program Files\Java\jdk1.8.0_77\bin;E:\Program Files\Java\jre1.8.0_77\bin
    

    You will then see the correct, current version:

    C:\>java -version
    java version "1.8.0_77"
    Java(TM) SE Runtime Environment (build 1.8.0_77-b03)
    Java HotSpot(TM) 64-Bit Server VM (build 25.77-b03, mixed mode)
    
    0 讨论(0)
  • 2020-11-30 20:41

    aribeiro answer has worked for me - with minor changes

    • I Removed the reference to C:\ProgramData\Oracle\Java\javapath; from the Path environment variable
    • I made /path/to/jdkhome as the first entry in my PATH environment variable. I think this alone is all that is needed.
    0 讨论(0)
  • 2020-11-30 20:42

    My solution for this problem came after reading and trying all of the above.

    In my case I tried to downgrade Java to use printouts in Apache ActiveMQ. After uninstalling all Java versions and cleaning the registry I was getting the same error

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

    In my case I needed to go to environment variables, edit path, open the javapath location (C:\ProgramData\Oracle\Java\javapath) and there it was - three files (java.exe, javaw.exe, javaws.exe) that remained from the JRE8 version.

    After establishing this fact I simply switched them with the same files from C:\Windows\SysWOW64 directory (those were from the JRE7 version) and it all worked perfectly.

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

    I have had the similar problem. Moving the JDK and JRE path to the top of the path variable solved the problem (which takes first priority over what is present under System32)

    For example, here is mine:

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