While running
sencha app build production
I am getting the following error:
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.
java -version
, command is showing following:
java version "1.8.0_40" Java(TM) SE Runtime Environment (build 1.8.0_40-b26) Java HotSpot(TM) 64-Bit Server VM (build 25.40-b25, mixed mode)
Not able to find where path is going wrong. Any idea?
----------------------- EDIT ------------------------------------------------
Note: I am using Windows 7 (64 bit).
I have tried uninstalling the sencha touch cmd and reinstalling. But still same error.
I have uninstalled all the java version instances and reinstalled the latest one, Still the problem persist.
Remove it from the System path:
And it will fix the issue in upgrading java version from 1.7 to 1.8
After trying more than hundred of tricks, finally got success.
I removed all
java.exe
,javaw.exe
andjavaws.exe
from myWindows\System32
andWindows\SysWOW64
folder. [Try step 2 if you have x64 system (Win 7 64 bits)]In my case (Windows 7 64-bit), I just did the following:
Afterwards, I closed all open command line consoles, reopened them and ran java -version.
Please change JAVA_BIN and JAVA_HOME system variable, and then restart system or maybe relogin. You are having that error because it is still jdk1.7 path. On windows it is like this:
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... :)
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.
Before the above make sure the Registry's CurrentVersion is 1.8
In the START menu type "regedit" to open the Registry editor