While running
sencha app build production
I am getting the following error:
Error: Registry key \'Software\\JavaSof
[HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment]
CurrentVersion
from "1.8" to "1.7"You have to define your jdk folder in variable JAVA_HOME, add %JAVA_HOME% to your variable path
Delete or change name of your java.exe, javaw.exe and javaws in your folder system32
execute cmd.exe, java -version now take the new version that you define in JAVA_HOME.
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=<YOUR JDK 7 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\<YOUR USER>\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.