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

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

    One possible solution to this problem is to add at Sencha CMD folder a bat file as sugested at this thread Sencha Cmd 5 + Java 8 Error.

    The batch will have the name "sencha.bat" with this code:

    @echo off
    set JAVA_HOME=
    set PATH=%JAVA_HOME%\bin;%PATH%
    set SENCHA_HOME=%~dp0
    java -jar "%SENCHA_HOME%\sencha.jar" %*
    

    Place it at sencha folder, in my case is

    C:\Users\\bin\Sencha\Architect\Cmd\6.2.0.103
    

    The following step is to change PATHEXT enviroment varible. Change at user variables to have the least impact possible.

    I change from

    COM;.CMD;.EXE;.BAT;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
    

    to

    COM;.BAT;.EXE;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
    

    The idea is to make windows run .bat files first than .exe files. This is important because in sencha folder there is already an "sencha.exe" file. And in the command line if you type "sencha" it will execute "sencha.exe" instead of "sencha.bat".

    This was the only solution that worked for because I'm very restricted when it comes to permissions.

提交回复
热议问题