your programing

레지스트리 키 오류 : Java 버전에 '1.8'값이 있지만 '1.7'이 필요합니다.

lovepro 2020. 9. 25. 23:23
반응형

레지스트리 키 오류 : Java 버전에 '1.8'값이 있지만 '1.7'이 필요합니다.


달리는 동안

sencha app build production

다음과 같은 오류가 발생합니다.

오류 : 레지스트리 키 'Software \ JavaSoft \ Java Runtime Environment'\ CurrentVersion '

값은 '1.8'이지만 '1.7'은 필수입니다. 오류 : java.dll을 찾을 수 없습니다. 오류 : Java SE 런타임 환경을 찾을 수 없습니다.

java -version , 명령은 다음을 표시합니다.

Java 버전 "1.8.0_40"Java (TM) SE 런타임 환경 (빌드 1.8.0_40-b26) Java HotSpot (TM) 64 비트 서버 VM (빌드 25.40-b25, 혼합 모드)

경로가 잘못된 곳을 찾을 수 없습니다. 어떤 생각?

----------------------- 편집하다 -------------------------- ----------------------

참고 : Windows 7 (64 비트)을 사용하고 있습니다.

sencha touch cmd를 제거하고 다시 설치해 보았습니다. 그러나 여전히 같은 오류입니다.

모든 Java 버전 인스턴스를 제거하고 최신 인스턴스를 다시 설치했지만 여전히 문제가 지속됩니다.


수백 가지 이상의 트릭을 시도한 끝에 마침내 성공했습니다.

나는 모두 제거 java.exe, javaw.exejavaws.exe에서 내

  1. Windows\System32

  2. Windows\SysWOW64폴더. [x64 시스템 (Win 7 64 비트)이있는 경우 2 단계 시도]


제 경우 (Windows 7 64 비트)에서는 다음을 수행했습니다.

  • C : \ ProgramData \ Oracle \ Java \ javapath에 대한 참조를 제거했습니다 . 로부터 경로 환경 변수
  • C : \ Windows \ System32 폴더 에서 java , javawjavaws 파일을 제거했습니다 .

그 후 열려있는 모든 명령 줄 콘솔을 닫고 다시 열고 java -version을 실행했습니다 .


  1. regedit 열기
  2. 이동 [HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment]
  3. CurrentVersion을 "1.8"에서 "1.7"로 변경

re : Windows 사용자

아니요. PATH 변수에서 Javapath 환경 참조를 제거하지 마십시오.

레지스트리가 작동하지 않는 이유는 Oracle Javapath 스크립트가 JRE 및 JDK 디렉토리 앞의 PATH 시퀀스에서 실행되어야하기 때문입니다. 현재 버전을 정렬합니다.

이 디렉토리를 %PATH%변수 의 HEAD에 넣으십시오 .

C:\ProgramData\Oracle\Java\javapath

[또는 데스크탑 어디에 있든]

그래서 당신의 PATH는 다음과 같이 보일 것입니다.

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

그러면 올바른 현재 버전이 표시됩니다.

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)

내 경험:

Windows 8.1을 사용 하고 있으며 JAVA 버전을 1.8에서 1.7로 다운 그레이드했는데 동일한 오류가 발생했습니다.

오류 : 레지스트리 키 'Software \ JavaSoft \ Ja의 값은'1.7 '이지만'1.8 '이 필요합니다.

C : \ Windows \ System32 폴더 에서 java.exe , javaw.exejavaws.ex e를 삭제 했으며 저에게 효과적 이었습니다.


나는 같은 문제가 있었다. 나를 위해 일한 간단한 솔루션은 for의 항목을 다시 정렬하는 것 PATH입니다 JRE/JDK. 이 문제는 설치 후 JRE 8일부 실행 파일을 System32 or SysWOW64디렉토리에 넣은 후 나타나기 시작했으며 이러한 실행 파일이 엉망입니다. 문제를 해결하려면 :

  1. JDK 홈을 가리키는 환경 변수를 JAVA_HOME.

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

  2. %JAVA_HOME%\binPATH 환경 변수의 시작 부분에 항목 넣으십시오 . 의 기존 값을 추가합니다 PATH. 예를 들면 :

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


오류가 명시 적입니다 ...

오류 : 레지스트리 키 'Software \ JavaSoft \ Java Runtime Environment'\ CurrentVersion '에'1.8 '값이 있지만'1.7 '이 필요합니다.

오류 : java.dll을 찾을 수 없습니다.

오류 : Java SE Runtime Environment를 찾을 수 없습니다.

... > 레지스트리 키 값이 1.8 인 java.exe동안 1.7 실행 파일 을 사용하려고합니다 .HKEY_LOCAL_MACHINE\Software\JavaSoft\Java Runtime EnvironmentCurrentVersion

제안 된 솔루션의 반복되는 주제는 오류가 구성 오류라는 것 입니다. 이 오류는 여러 가지 다른 방식으로 해결 될 수있다 (와 사용자의 환경이나 자바 실행 파일의 제거의 예 재구성 손가락-넘어 희망 또 다른 대체이 존재 함을 java.exe사용자의를 %PATH%하고, 대체가 java.exe올바른 실행 파일입니다).

올바른 해결책은 당신이 달성하려고하는지에 따라 달라집니다 : "? 당신은 JDK-7에 JDK-8로 업그레이드하려고 JDK-8에서 다운 그레이드하려고 ..."

복제 단계

  1. jdk-7u80-windows-x64.exe 설치

메모:

  • java.exe사용자 %PATH%사용할 수 있는 실행 파일 C:\Windows\System32
  • 설치는 사용자를 업데이트하지 않습니다. %PATH%
  • HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment> CurrentVersion문자열 레지스트리 항목 값으로 (다른 사람의 사이에서) 작성1.7
  1. jdk-8u191-windows-x64.exe 설치

메모:

  • 사용자 %PATH%C:\Program Files (x86)\Common Files\Oracle\Java\javapath첫 번째 항목 으로 포함 되도록 업데이트됩니다.
  • 하여 HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment> CurrentVersion문자열 레지스트리 항목 값이 업데이트됩니다1.8
  1. 사용자 %PATH%환경 변수를 업데이트하고 제거합니다.C:\Program Files (x86)\Common Files\Oracle\Java\javapath

  2. 새 명령 프롬프트에서 java -version

오류 : 레지스트리 키 'Software \ JavaSoft \ Java Runtime Environment'\ CurrentVersion '에'1.8 '값이 있지만'1.7 '이 필요합니다.

오류 : java.dll을 찾을 수 없습니다.

오류 : Java SE Runtime Environment를 찾을 수 없습니다.

솔루션

  1. OP의 솔루션 https://stackoverflow.com/a/29769311/1423507 은 오류에 대한 "손잡이가 교차하고 java.exe사용자에게 %PATH%폴 백이 있고 폴백 실행 파일이 올바른지 희망 "접근 방식입니다. 복제 단계가 주어지면 java.exe, javaw.exejavaws.exe실행 파일을 C:\Windows\System32(내 경우에만) 제거하면 더 이상 java.exe사용자에게 존재 하지 않아 해결책이 아닌 %PATH%오류가 발생 'java' is not recognized as an internal or external command, operable program or batch file.합니다.

  2. answers https://stackoverflow.com/a/35775493/1423507 and https://stackoverflow.com/a/36516620/1423507 work however you're reverting to using java.exe 1.7 (e.g. update the CurrentVersion registry key's value to match the java.exe version found in the users %PATH%).

  3. make surejava.exe 1.8 is the first found in the users %PATH% (how you do that is irrelevant) i.e.:

    • update the users %PATH% to include C:\Program Files (x86)\Common Files\Oracle\Java\javapath first (ensure that the executables in that directory are correct)
    • update the users %PATH% to include the absolute path of your java binaries first (set PATH="C:\Program Files\Java\jre1.8.0_191\bin;%PATH%")
    • set java specific environment variables and update the users %PATH% with them (set JAVA_HOME="C:\Program Files\Java"; set JRE_HOME=%JAVA_HOME%\jre1.8.0_191; set PATH=%JRE_HOME%\bin;%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.


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"

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.


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;'


You have to define your jdk folder in variable JAVA_HOME, add %JAVA_HOME% to your variable path

Delete or change name of your java.exe, javaw.exe and javaws in your folder system32

execute cmd.exe, java -version now take the new version that you define in JAVA_HOME.


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.


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.


My short contribution, for sharing the same problem with Talend Open Studio 64 bit version.

  1. Launch ..\TOS_DI-Win32-20150702_1326-V6.0.0\TOS_DI-win-x86_64.exe manually (not link an startup Windows menu)
  2. and this registry error message appears

To resolve this, remove all java.exe, javaw.exe and javaws.exe files on c:\ProgramData\Oracle\Java\javapath\

and TOS start with 64 bits version correctly !


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


aribeiro answer has worked for me - with minor changes

  • I Removed the reference to C:\ProgramData\Oracle\Java\javapath; from the Path environment variable
  • I made /path/to/jdkhome as the first entry in my PATH environment variable. I think this alone is all that is needed.

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.


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


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.


One possible solution to this problem is to add at Sencha CMD folder a bat file as sugested at this thread Sencha Cmd 5 + Java 8 Error.

The batch will have the name "sencha.bat" with this code:

@echo off
set JAVA_HOME=<YOUR JDK 7 HOME>
set PATH=%JAVA_HOME%\bin;%PATH%
set SENCHA_HOME=%~dp0
java -jar "%SENCHA_HOME%\sencha.jar" %*

Place it at sencha folder, in my case is

C:\Users\<YOUR USER>\bin\Sencha\Architect\Cmd\6.2.0.103

The following step is to change PATHEXT enviroment varible. Change at user variables to have the least impact possible.

I change from

COM;.CMD;.EXE;.BAT;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC

to

COM;.BAT;.EXE;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC

The idea is to make windows run .bat files first than .exe files. This is important because in sencha folder there is already an "sencha.exe" file. And in the command line if you type "sencha" it will execute "sencha.exe" instead of "sencha.bat".

This was the only solution that worked for because I'm very restricted when it comes to permissions.


My System:- Windows 8.1

Java Environments

  • C:\JavaEnvironment\Java\jdk1.8.0_161
  • C:\JavaEnvironment\Java\jdk1.7.0_75

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:

enter image description here

I replicated the same change to User Variable: Path

enter image description here

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.


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


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:

enter image description here


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


just did this and it worked

HKLM > SOFTWARE > JavaSoft > Java Runtime Environment

just manually change current version to 1.7 .

lol ... but it worked!

참고URL : https://stackoverflow.com/questions/29697543/registry-key-error-java-version-has-value-1-8-but-1-7-is-required

반응형