While running
sencha app build production
I am getting the following error:
Error: Registry key \'Software\\JavaSof
Unistall Java 8 from your program list. BY following below steps:-
From your desktop, click on the Start Menu (or Start ball) at the lower left of your screen. Go to the Control Panel. Click on Programs and Features. Select Java8 and click Uninstall
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.
re: Windows users
No. Don't remove the Javapath environment reference from your PATH variable.
The reason why the registry didn't work is that the Oracle Javapath script needs to run in the PATH sequence ahead of the JRE & JDK directories - it will sort out the current version:
put this directory at the HEAD of your %PATH%
variable:
C:\ProgramData\Oracle\Java\javapath
[or wherever it is on your desktop]
so your PATH will look something like this - mine for example
PATH=C:\ProgramData\Oracle\Java\javapath;<other path directories>;E:\Program Files\Java\jdk1.8.0_77\bin;E:\Program Files\Java\jre1.8.0_77\bin
You will then see the correct, current version:
C:\>java -version
java version "1.8.0_77"
Java(TM) SE Runtime Environment (build 1.8.0_77-b03)
Java HotSpot(TM) 64-Bit Server VM (build 25.77-b03, mixed mode)
aribeiro answer has worked for me - with minor changes
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 error
Error: Registry key 'Software\JavaSoft\Java Runtime Environment'\CurrentVersion' has value '1.7', but '1.8' is required."
In 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 the JRE7
version) and it all worked perfectly.
I have had the similar problem. Moving the JDK and JRE path to the top of the path variable solved the problem (which takes first priority over what is present under System32)
For example, here is mine: