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:43

Remove it from the System path:

%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem

And it will fix the issue in upgrading java version from 1.7 to 1.8

查看更多
姐就是有狂的资本
3楼-- · 2019-01-08 08:44

After trying more than hundred of tricks, finally got success.

I removed all java.exe, javaw.exe and javaws.exe from my

  1. Windows\System32 and

  2. Windows\SysWOW64 folder. [Try step 2 if you have x64 system (Win 7 64 bits)]

查看更多
beautiful°
4楼-- · 2019-01-08 08:45

In my case (Windows 7 64-bit), I just did the following:

  • Removed the reference to C:\ProgramData\Oracle\Java\javapath; from the Path environment variable
  • Removed files java, javaw and javaws from the C:\Windows\System32 folder

Afterwards, I closed all open command line consoles, reopened them and ran java -version.

查看更多
Juvenile、少年°
5楼-- · 2019-01-08 08:46

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: enter image description here

查看更多
Rolldiameter
6楼-- · 2019-01-08 08:46

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... :)

查看更多
趁早两清
7楼-- · 2019-01-08 08:50

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.

C:\Users\HEcom>java -version
java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)

Before the above make sure the Registry's CurrentVersion is 1.8

In the START menu type "regedit" to open the Registry editor

  1. Go to "HKEY_LOCAL_MACHINE" on the left-hand side registry explorer/tree menu
  2. Click "SOFTWARE" within the "HKEY_LOCAL_MACHINE" registries
  3. Click "JavaSoft" within the "SOFTWARE" registries
  4. Click "Java Runtime Environment" within the "JavaSoft" list of registries here you can see different versions of installed java
  5. Click "Java Runtime Environment"- On right hand side you will get 4-5 rows . Please select "CurrentVersion" and right Click( select modify option) make sure the version is "1.8"
查看更多
登录 后发表回答