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.
aribeiro answer has worked for me - with minor changes
There exist somewhere another java.exe from jre version 1.8 that it is in "path" you should find and delete it if it is possible. it may be in user tempdata for applications that need jre.
Just Install Java SE Runtime Environment JRE 7 !
Now you see "java 7" & "java 8" in "Programs and Features" in the "Control Panel"
It worked for me.
My System:- Windows 8.1
Java Environments
I recently installed Oracle 11g XE and I received the mentioned error message when accessed "java" command at command prompt.
I checked my environment variables, checked the sequence (as mentioned by previous replies) and detected that my system PATH variable had following entry as first entry:
C:\OracleDatabase\oraclexe\app\oracle\product\11.2.0\server\bin;
I changed the sequence and defined JDK path as first entry:
I replicated the same change to User Variable: Path
After finishing the above activity, I restarted the command prompt and executed java -version command and the problem had vanished. It displayed Java 8 as the current version.
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 errorIn 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 theJRE7
version) and it all worked perfectly.just did this and it worked
HKLM > SOFTWARE > JavaSoft > Java Runtime Environment
just manually change current version to 1.7 .
lol ... but it worked!