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

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

    First you should have Java 7. If you don't have, install it first (I don't know what you are using, Linux, Mac, yum, apt, homebrew, you should find out yourself.)

    If you already have Java 7, run:

    echo $JAVA_HOME
    

    Output should be something like this:/usr/lib/jvm/java-8-oracle. Near this directory, you should see java-7 directory. After you found it, run

    export JAVA_HOME=${java-7-dir}
    

    Change {java-7-dir} with your directory path. Then you can run your command.

    This is only a temporary solution. To change it permanently, put the above command to your ~/.bashrc file.

    EDIT: If you are using Windows, change environment variable of JAVA_HOME to your Java 7 installation directory path.

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

    I didn't delete any of the java.exe files, but changed the ordering of my System - "path" variable - so that it reflected %JAVA_HOME%\bin as the first entry. That did the trick.

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

    I had this error on some windows services running Java. In the end, on my machine I tried to uninstall the other versions of java.

    I left only 1.8 and now everything is working.

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

    In addition to Anand Gupta's answer, make sure no other java except for the one you need is used. Run which java (where java for Windows) and see which java executables are used. Just delete the ones you don't want to use and if the one you need is not present, add it to PATH.

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

    Kill all applications related to java in task manager and then delete the Java.exe , Javaw.exe and Jawaws.exe from C:\windows\System32

    This should solve your problem... :)

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

    After the latest automatic Java update, I could not run Java from the command prompt.

    My path variable had 'C:\ProgramData\Oracle\Java\javapath;'

    I could not cd into 'C:\ProgramData\Oracle\Java\javapath;' from the command prompt window, since it did not exist.

    I removed C:\ProgramData\Oracle\Java\javapath;' from the path variable and replaced it with 'C:\Program Files\Java\jre1.8.0_141\bin;'

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