While running
sencha app build production
I am getting the following error:
Error: Registry key \'Software\\JavaSof
First you should have Java 7. If you don't have, install it first (I don't know what you are using, Linux, Mac, yum, apt, homebrew, you should find out yourself.)
If you already have Java 7, run:
echo $JAVA_HOME
Output should be something like this:/usr/lib/jvm/java-8-oracle
. Near this directory, you should see java-7
directory. After you found it, run
export JAVA_HOME=${java-7-dir}
Change {java-7-dir}
with your directory path. Then you can run your command.
This is only a temporary solution. To change it permanently, put the above command to your ~/.bashrc
file.
EDIT: If you are using Windows, change environment variable of JAVA_HOME
to your Java 7 installation directory path.
I didn't delete any of the java.exe files, but changed the ordering of my System - "path" variable - so that it reflected %JAVA_HOME%\bin as the first entry. That did the trick.
I had this error on some windows services running Java. In the end, on my machine I tried to uninstall the other versions of java.
I left only 1.8 and now everything is working.
In addition to Anand Gupta's answer, make sure no other java except for the one you need is used.
Run which java
(where java
for Windows) and see which java executables are used.
Just delete the ones you don't want to use and if the one you need is not present, add it to PATH.
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... :)
After the latest automatic Java update, I could not run Java from the command prompt.
My path variable had 'C:\ProgramData\Oracle\Java\javapath;'
I could not cd into 'C:\ProgramData\Oracle\Java\javapath;' from the command prompt window, since it did not exist.
I removed C:\ProgramData\Oracle\Java\javapath;' from the path variable and replaced it with 'C:\Program Files\Java\jre1.8.0_141\bin;'