Registry key Error: Java version has value '1.

2019-01-08 08:00发布

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.

25条回答
冷血范
2楼-- · 2019-01-08 08:53

I've had the same problem. Simple solution that worked for me is to rearrange the entries in the PATH for JRE/JDK. This problem started to appear after installing JRE 8 whose installation has put some executable files in System32 or SysWOW64 directories, these executable files are messing up. To resolve the problem:

  1. Create environment variable pointing to JDK home as JAVA_HOME.

    set JAVA_HOME=C:\Progra~1\Java\jdk1.8.0_45

  2. Put the entry %JAVA_HOME%\bin at start in your PATH environment variable. Appending existing value of PATH. For example:

    path=C:\Program Files\Java\jdk1.8.0_45\bin;%path%

查看更多
登录 后发表回答