why do I get this? How can I fix it?
C:Usersash>java version
Error: Registry key 'SoftwareJavaSoftJava Runtime Environment'CurrentVersion'
has value '1.7.0_01', but '1.7' is required.
Error: could not find java.dll
Error: Could not find Java SE Runtime Environment.
DNA
41.7k12 gold badges107 silver badges143 bronze badges
asked Feb 16, 2012 at 14:48
1
The accepted solution for Reinstalling ALL JDKs was a bit harsh.
I too experienced this problem and here is my 2 cents:
This problem started happening since I installed JDK 8 and still had JDK 6 installed. I need for different projects I’m working on.
I noticed I had both a User and a System %JAVA_HOME%
, so I removed my User %JAVA_HOME%
variable and left only the system one.
I also noticed that in my Oracle installation there was some Java executables and I believe those where the ones conflicting since both my Oracle and Java installations were in my %PATH%
variable.
I removed all Java paths from my %PATH%
Variable and only left the %JAVA_HOME%bin
at the start of the variable for avoiding any conflicts with the Oracle installation.
answered Nov 27, 2014 at 12:11
ffleandroffleandro
3,9984 gold badges33 silver badges48 bronze badges
1
I had a similar issue after installing the java 1.8.
To fix this go to Advance System setting —> path and remove
C:ProgramDataOracleJavajavapath;
answered Aug 17, 2016 at 21:45
Rohit JainRohit Jain
2,00216 silver badges18 bronze badges
1
Removing
C:ProgramDataOracleJavajavapath;
work like charm
answered Mar 27, 2018 at 2:28
blazehubblazehub
1,86017 silver badges25 bronze badges
1
Reinstall JDK and set system variable JAVA_HOME on your JDK. (e.g. C:toolsjdk7)
And add JAVA_HOME variable to your PATH system variable
Type in command line
echo %JAVA_HOME%
and
java -version
To verify whether your installation was done successfully.
answered Feb 16, 2012 at 15:56
IlyaIlya
28.8k19 gold badges108 silver badges155 bronze badges
4
I had a similar issue after installing the java 10.0
To fix this go to Advance System setting —> path and remove
C:ProgramDataOracleJavajavapath;
answered Oct 10, 2018 at 1:44
NéêrãjNéêrãj
611 silver badge2 bronze badges
I had to remove the Common Files javapath from the ‘Path’ that was conflicting, in order to make it work. Now thankfully the java -version works just fine.
C:Program Files (x86)Common FilesOracleJavajavapath
answered Apr 30, 2019 at 15:53
zagoo2000zagoo2000
1651 gold badge3 silver badges10 bronze badges
0
Make sure your JDK Path
variable is directing to the bin
folder and is at the top of the list, because it always uses the first match. By moving it to the top you can make sure that no other path is matched first.
If there’s any other entry that has a file called java (such as C:ProgramDataOracleJavajavapath
) it will run the command against that file instead of the java file in your JDK. There’s no need to reinstall the entire JDK unless your files are corrupt or damaged for some reason.
answered May 31, 2018 at 17:10
DFSFOTDFSFOT
5263 silver badges19 bronze badges
This problem generally occurs in Windows when your «Java Runtime Environment» registry entry is missing or mismatched with the installed JDK. The mismatch can be due to multiple JDKs.
Steps to resolve:
-
Open the Run window:
Press windows+R
-
Open registry window:
Type
regedit
and enter. -
Go to:
HKEY_LOCAL_MACHINESOFTWAREJavaSoft
-
If Java Runtime Environment is not present inside JavaSoft, then create a new Key and give the name Java Runtime Environment.
-
For Java Runtime Environment create «CurrentVersion» String Key and give appropriate version as value:
-
Create a new subkey of 1.8.
-
For 1.8 create a String Key with name JavaHome with the value of JRE home:
Ref: https://mybindirectory.blogspot.com/2019/05/error-could-not-find-javadll.html
answered May 6, 2019 at 7:47
ShivamShivam
3613 silver badges8 bronze badges
I edited my path to put the Oracle JDK at the start of the path and that fixed it.
answered Aug 19, 2016 at 15:27
Problem:
We had the same problem in our Windows 2012 server. We used JAVA_HOME environmental system variable, an we used in the PATH this kind of settings: …%JAVA_HOME%/bin;…
and no other java related settings was in the PATH.
The problem was we had a space at the end of the value of the JAVA_HOME variable. Like ‘C:Program FilesJavaJdk 1.8.0_172 ‘ so the %JAVA_HOME%/bin meant ‘C:Program FilesJavaJdk 1.8.0_172 bin’. So because the value was split by space and the system tried to find java.exe at ‘C:Program FilesJavaJdk 1.8.0_172’ where it is obviously not.
Solution was: Delete the space from the end of value of the JAVA_HOME !
answered Jul 5, 2018 at 13:29
- Uninstall Java from machine
- Check Java folder is deleted from Program Files
- Check Registry does not have any instance of Java
- Open system Variables and delete the ONLY java path from PATH
- Now install the new version again.
- Set the Path in System Variables.
This process cleans up all the traces of java and then install fresh java.
Note: This issues occurs when there is multiple installation and uninstall done.
answered Jan 6, 2019 at 18:43
You could be using a 32 bit version of java on a 64 bit environment.
Export the registry hive form HKLMSoftwareJavaSoft and import into HKLMSoftwareWow6432NodeJavaSoft. For 1.6 I only needed JavaHome and RuntimeLib values.
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINESOFTWAREWow6432NodeJavasoft]
[HKEY_LOCAL_MACHINESOFTWAREWow6432NodeJavasoftJava Runtime Environment]
"CurrentVersion"="1.6"
[HKEY_LOCAL_MACHINESOFTWAREWow6432NodeJavasoftJava Runtime Environment1.6]
"JavaHome"="C:\Java\jre"
"RuntimeLib"="C:\Java\jre\bin\client\jvm.dll"
WEFX
8,1628 gold badges65 silver badges98 bronze badges
answered Apr 9, 2013 at 12:32
None of the above worked for me, unfortunately.
The error solved when I uninstalled the old JDK versions that were installed on my computer. I did it simply with the «Uninstall or change a program» tool (under the Control Panel).
answered Dec 17, 2019 at 12:13
I removed the «C:Program Files (x86)Herokubin» from PATH variable and the problem has gone. I think it is probably the Heroku require different version of Java. So check all directories in your PATH variable, remove the possible ones may have confliction.
answered Jan 23, 2018 at 14:24
HappyLiangHappyLiang
7221 gold badge5 silver badges9 bronze badges
If you face this error in cmd with another error as «could not find runtime environment» after you have done all settings in Environment Variable. Then you just need to run jre.exe in your jdk folder and reinstall it and then recheck it by java -version command. Hope it will help you.
Elletlar
3,1067 gold badges30 silver badges38 bronze badges
answered Aug 9, 2018 at 12:19
- rename file
"C:WindowsSystem32java.exe" to "C:WindowsSystem32java_old.exe"
- CMD —>
java -version
done.
answered Dec 13, 2018 at 3:11
In my case the regedit information was correct and the problem was solved by doing the below:
1) setting JAVA_HOME to jdk — set JAVA_HOME=C:Program FilesJava\bin
2) setting PATH to jre — set PATH=»C:Program FilesJava\bin»
answered Jun 9, 2019 at 17:24
after adding the requirements path as illustrated up and deleting C:ProgramDataOracleJavajavapath;. don’t forget to reopen your editor.
answered Nov 15, 2020 at 9:20
Go to CMD and type the following:
SET PATH=C:Program FilesJavajdk1.8.0_291bin
(here jdk1.8.0_291 represents your java version, it may differ for you)
answered Jun 21, 2021 at 20:26
2
Java Questions
Introduction
In this tutorial, we will go through the steps involved in how to fix the Eclipse error could not find java.dll. Eclipse installation depends on clean Java install on the machine. This error is due to corrupt java install on the machine.
Eclipse Error during the launch
Error: opening registry key ‘SoftwareJavaSoftJava Runtime Environment’
Error: could not find java.dll
Error: Could not find Java SE Runtime Environment.
Root Cause: Java Corrupt Install
Fix for this error is to identify the corrupt Java install and reinstall it on the machine. In case of multiple Java installations, remove the corrupt install from the PATH variable.
Open a command shell and issue the following command:
>java -version
Error: opening registry key ‘SoftwareJavaSoftJava Runtime Environment’
Error: could not find java.dll
Error: Could not find Java SE Runtime Environment.
Multiple Java Installs
Check the PATH variable to check if we have added multiple Java install paths. This error could be due to one of the corrupt Java install that has been specified in the PATH.
Fix:
In this case, we need to identify the corrupt install and remove the corrupt Java install path from the environment variable.
Check Environment variables
To check JAVA_HOME on Windows:
Sample command
>echo %JAVA_HOME%
C:Program FilesJavajdk1.8.0_121
To check PATH variable on Windows:
Sample command
>echo %PATH% C:oraclexeapporacleproduct11.2.0serverbin;C:ProgramDataOracleJava javapath;C:WINDOWSsystem32;C:WINDOWS;C:WINDOWSSystem32Wbem; C:WINDOWSSystem32WindowsPowerShellv1.0;C:Program Files (x86) ATI TechnologiesATI.ACECore-Static;C:mavenbin;C:Program Files Javajdk1.8.0_121bin;C:Program Files (x86)SilverfrostFTN95; C:Program FilesMATLABR2017bbin;C:codeblocksMinGWbin; C:Program FilesMySqlbin;C:WINDOWSSystem32OpenSSH; C:Program Files (x86)Javajdk1.8.0dbbin;C:Program FilesMongoDB Server4.0bin;C:ffmpegbin;C:Python27;C:UsersvaniAppDataLocal AndroidSdkplatform-tools;C:UsersvaniAppDataLocalMicrosoftWindowsApps; C:Fortrang95bin;C:sqlite
In this case, there are multiple Java installs, and any could be corrupted or removed.
C:Program Files (x86)Javajdk1.8.0dbbin
C:ProgramDataOracleJavajavapath
C:Program FilesJavajdk1.8.0_121bin;
The Oracle product that was removed from the machine still had it pointed in the PATH variable. Removing the entry from the PATH fixed the problem.
why do I get this? How can I fix it?
C:Usersash>java version
Error: Registry key 'SoftwareJavaSoftJava Runtime Environment'CurrentVersion'
has value '1.7.0_01', but '1.7' is required.
Error: could not find java.dll
Error: Could not find Java SE Runtime Environment.
DNA
41.7k12 gold badges107 silver badges143 bronze badges
asked Feb 16, 2012 at 14:48
1
The accepted solution for Reinstalling ALL JDKs was a bit harsh.
I too experienced this problem and here is my 2 cents:
This problem started happening since I installed JDK 8 and still had JDK 6 installed. I need for different projects I’m working on.
I noticed I had both a User and a System %JAVA_HOME%
, so I removed my User %JAVA_HOME%
variable and left only the system one.
I also noticed that in my Oracle installation there was some Java executables and I believe those where the ones conflicting since both my Oracle and Java installations were in my %PATH%
variable.
I removed all Java paths from my %PATH%
Variable and only left the %JAVA_HOME%bin
at the start of the variable for avoiding any conflicts with the Oracle installation.
answered Nov 27, 2014 at 12:11
ffleandroffleandro
3,9984 gold badges33 silver badges48 bronze badges
1
I had a similar issue after installing the java 1.8.
To fix this go to Advance System setting —> path and remove
C:ProgramDataOracleJavajavapath;
answered Aug 17, 2016 at 21:45
Rohit JainRohit Jain
2,00216 silver badges18 bronze badges
1
Removing
C:ProgramDataOracleJavajavapath;
work like charm
answered Mar 27, 2018 at 2:28
blazehubblazehub
1,86017 silver badges25 bronze badges
1
Reinstall JDK and set system variable JAVA_HOME on your JDK. (e.g. C:toolsjdk7)
And add JAVA_HOME variable to your PATH system variable
Type in command line
echo %JAVA_HOME%
and
java -version
To verify whether your installation was done successfully.
answered Feb 16, 2012 at 15:56
IlyaIlya
28.8k19 gold badges108 silver badges155 bronze badges
4
I had a similar issue after installing the java 10.0
To fix this go to Advance System setting —> path and remove
C:ProgramDataOracleJavajavapath;
answered Oct 10, 2018 at 1:44
NéêrãjNéêrãj
611 silver badge2 bronze badges
I had to remove the Common Files javapath from the ‘Path’ that was conflicting, in order to make it work. Now thankfully the java -version works just fine.
C:Program Files (x86)Common FilesOracleJavajavapath
answered Apr 30, 2019 at 15:53
zagoo2000zagoo2000
1651 gold badge3 silver badges10 bronze badges
0
Make sure your JDK Path
variable is directing to the bin
folder and is at the top of the list, because it always uses the first match. By moving it to the top you can make sure that no other path is matched first.
If there’s any other entry that has a file called java (such as C:ProgramDataOracleJavajavapath
) it will run the command against that file instead of the java file in your JDK. There’s no need to reinstall the entire JDK unless your files are corrupt or damaged for some reason.
answered May 31, 2018 at 17:10
DFSFOTDFSFOT
5263 silver badges19 bronze badges
This problem generally occurs in Windows when your «Java Runtime Environment» registry entry is missing or mismatched with the installed JDK. The mismatch can be due to multiple JDKs.
Steps to resolve:
-
Open the Run window:
Press windows+R
-
Open registry window:
Type
regedit
and enter. -
Go to:
HKEY_LOCAL_MACHINESOFTWAREJavaSoft
-
If Java Runtime Environment is not present inside JavaSoft, then create a new Key and give the name Java Runtime Environment.
-
For Java Runtime Environment create «CurrentVersion» String Key and give appropriate version as value:
-
Create a new subkey of 1.8.
-
For 1.8 create a String Key with name JavaHome with the value of JRE home:
Ref: https://mybindirectory.blogspot.com/2019/05/error-could-not-find-javadll.html
answered May 6, 2019 at 7:47
ShivamShivam
3613 silver badges8 bronze badges
I edited my path to put the Oracle JDK at the start of the path and that fixed it.
answered Aug 19, 2016 at 15:27
Problem:
We had the same problem in our Windows 2012 server. We used JAVA_HOME environmental system variable, an we used in the PATH this kind of settings: …%JAVA_HOME%/bin;…
and no other java related settings was in the PATH.
The problem was we had a space at the end of the value of the JAVA_HOME variable. Like ‘C:Program FilesJavaJdk 1.8.0_172 ‘ so the %JAVA_HOME%/bin meant ‘C:Program FilesJavaJdk 1.8.0_172 bin’. So because the value was split by space and the system tried to find java.exe at ‘C:Program FilesJavaJdk 1.8.0_172’ where it is obviously not.
Solution was: Delete the space from the end of value of the JAVA_HOME !
answered Jul 5, 2018 at 13:29
- Uninstall Java from machine
- Check Java folder is deleted from Program Files
- Check Registry does not have any instance of Java
- Open system Variables and delete the ONLY java path from PATH
- Now install the new version again.
- Set the Path in System Variables.
This process cleans up all the traces of java and then install fresh java.
Note: This issues occurs when there is multiple installation and uninstall done.
answered Jan 6, 2019 at 18:43
You could be using a 32 bit version of java on a 64 bit environment.
Export the registry hive form HKLMSoftwareJavaSoft and import into HKLMSoftwareWow6432NodeJavaSoft. For 1.6 I only needed JavaHome and RuntimeLib values.
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINESOFTWAREWow6432NodeJavasoft]
[HKEY_LOCAL_MACHINESOFTWAREWow6432NodeJavasoftJava Runtime Environment]
"CurrentVersion"="1.6"
[HKEY_LOCAL_MACHINESOFTWAREWow6432NodeJavasoftJava Runtime Environment1.6]
"JavaHome"="C:\Java\jre"
"RuntimeLib"="C:\Java\jre\bin\client\jvm.dll"
WEFX
8,1628 gold badges65 silver badges98 bronze badges
answered Apr 9, 2013 at 12:32
None of the above worked for me, unfortunately.
The error solved when I uninstalled the old JDK versions that were installed on my computer. I did it simply with the «Uninstall or change a program» tool (under the Control Panel).
answered Dec 17, 2019 at 12:13
I removed the «C:Program Files (x86)Herokubin» from PATH variable and the problem has gone. I think it is probably the Heroku require different version of Java. So check all directories in your PATH variable, remove the possible ones may have confliction.
answered Jan 23, 2018 at 14:24
HappyLiangHappyLiang
7221 gold badge5 silver badges9 bronze badges
If you face this error in cmd with another error as «could not find runtime environment» after you have done all settings in Environment Variable. Then you just need to run jre.exe in your jdk folder and reinstall it and then recheck it by java -version command. Hope it will help you.
Elletlar
3,1067 gold badges30 silver badges38 bronze badges
answered Aug 9, 2018 at 12:19
- rename file
"C:WindowsSystem32java.exe" to "C:WindowsSystem32java_old.exe"
- CMD —>
java -version
done.
answered Dec 13, 2018 at 3:11
In my case the regedit information was correct and the problem was solved by doing the below:
1) setting JAVA_HOME to jdk — set JAVA_HOME=C:Program FilesJava\bin
2) setting PATH to jre — set PATH=»C:Program FilesJava\bin»
answered Jun 9, 2019 at 17:24
after adding the requirements path as illustrated up and deleting C:ProgramDataOracleJavajavapath;. don’t forget to reopen your editor.
answered Nov 15, 2020 at 9:20
Go to CMD and type the following:
SET PATH=C:Program FilesJavajdk1.8.0_291bin
(here jdk1.8.0_291 represents your java version, it may differ for you)
answered Jun 21, 2021 at 20:26
2
why do I get this? How can I fix it?
C:Usersash>java version
Error: Registry key 'SoftwareJavaSoftJava Runtime Environment'CurrentVersion'
has value '1.7.0_01', but '1.7' is required.
Error: could not find java.dll
Error: Could not find Java SE Runtime Environment.
DNA
41.7k12 gold badges107 silver badges143 bronze badges
asked Feb 16, 2012 at 14:48
1
The accepted solution for Reinstalling ALL JDKs was a bit harsh.
I too experienced this problem and here is my 2 cents:
This problem started happening since I installed JDK 8 and still had JDK 6 installed. I need for different projects I’m working on.
I noticed I had both a User and a System %JAVA_HOME%
, so I removed my User %JAVA_HOME%
variable and left only the system one.
I also noticed that in my Oracle installation there was some Java executables and I believe those where the ones conflicting since both my Oracle and Java installations were in my %PATH%
variable.
I removed all Java paths from my %PATH%
Variable and only left the %JAVA_HOME%bin
at the start of the variable for avoiding any conflicts with the Oracle installation.
answered Nov 27, 2014 at 12:11
ffleandroffleandro
3,9984 gold badges33 silver badges48 bronze badges
1
I had a similar issue after installing the java 1.8.
To fix this go to Advance System setting —> path and remove
C:ProgramDataOracleJavajavapath;
answered Aug 17, 2016 at 21:45
Rohit JainRohit Jain
2,00216 silver badges18 bronze badges
1
Removing
C:ProgramDataOracleJavajavapath;
work like charm
answered Mar 27, 2018 at 2:28
blazehubblazehub
1,86017 silver badges25 bronze badges
1
Reinstall JDK and set system variable JAVA_HOME on your JDK. (e.g. C:toolsjdk7)
And add JAVA_HOME variable to your PATH system variable
Type in command line
echo %JAVA_HOME%
and
java -version
To verify whether your installation was done successfully.
answered Feb 16, 2012 at 15:56
IlyaIlya
28.8k19 gold badges108 silver badges155 bronze badges
4
I had a similar issue after installing the java 10.0
To fix this go to Advance System setting —> path and remove
C:ProgramDataOracleJavajavapath;
answered Oct 10, 2018 at 1:44
NéêrãjNéêrãj
611 silver badge2 bronze badges
I had to remove the Common Files javapath from the ‘Path’ that was conflicting, in order to make it work. Now thankfully the java -version works just fine.
C:Program Files (x86)Common FilesOracleJavajavapath
answered Apr 30, 2019 at 15:53
zagoo2000zagoo2000
1651 gold badge3 silver badges10 bronze badges
0
Make sure your JDK Path
variable is directing to the bin
folder and is at the top of the list, because it always uses the first match. By moving it to the top you can make sure that no other path is matched first.
If there’s any other entry that has a file called java (such as C:ProgramDataOracleJavajavapath
) it will run the command against that file instead of the java file in your JDK. There’s no need to reinstall the entire JDK unless your files are corrupt or damaged for some reason.
answered May 31, 2018 at 17:10
DFSFOTDFSFOT
5263 silver badges19 bronze badges
This problem generally occurs in Windows when your «Java Runtime Environment» registry entry is missing or mismatched with the installed JDK. The mismatch can be due to multiple JDKs.
Steps to resolve:
-
Open the Run window:
Press windows+R
-
Open registry window:
Type
regedit
and enter. -
Go to:
HKEY_LOCAL_MACHINESOFTWAREJavaSoft
-
If Java Runtime Environment is not present inside JavaSoft, then create a new Key and give the name Java Runtime Environment.
-
For Java Runtime Environment create «CurrentVersion» String Key and give appropriate version as value:
-
Create a new subkey of 1.8.
-
For 1.8 create a String Key with name JavaHome with the value of JRE home:
Ref: https://mybindirectory.blogspot.com/2019/05/error-could-not-find-javadll.html
answered May 6, 2019 at 7:47
ShivamShivam
3613 silver badges8 bronze badges
I edited my path to put the Oracle JDK at the start of the path and that fixed it.
answered Aug 19, 2016 at 15:27
Problem:
We had the same problem in our Windows 2012 server. We used JAVA_HOME environmental system variable, an we used in the PATH this kind of settings: …%JAVA_HOME%/bin;…
and no other java related settings was in the PATH.
The problem was we had a space at the end of the value of the JAVA_HOME variable. Like ‘C:Program FilesJavaJdk 1.8.0_172 ‘ so the %JAVA_HOME%/bin meant ‘C:Program FilesJavaJdk 1.8.0_172 bin’. So because the value was split by space and the system tried to find java.exe at ‘C:Program FilesJavaJdk 1.8.0_172’ where it is obviously not.
Solution was: Delete the space from the end of value of the JAVA_HOME !
answered Jul 5, 2018 at 13:29
- Uninstall Java from machine
- Check Java folder is deleted from Program Files
- Check Registry does not have any instance of Java
- Open system Variables and delete the ONLY java path from PATH
- Now install the new version again.
- Set the Path in System Variables.
This process cleans up all the traces of java and then install fresh java.
Note: This issues occurs when there is multiple installation and uninstall done.
answered Jan 6, 2019 at 18:43
You could be using a 32 bit version of java on a 64 bit environment.
Export the registry hive form HKLMSoftwareJavaSoft and import into HKLMSoftwareWow6432NodeJavaSoft. For 1.6 I only needed JavaHome and RuntimeLib values.
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINESOFTWAREWow6432NodeJavasoft]
[HKEY_LOCAL_MACHINESOFTWAREWow6432NodeJavasoftJava Runtime Environment]
"CurrentVersion"="1.6"
[HKEY_LOCAL_MACHINESOFTWAREWow6432NodeJavasoftJava Runtime Environment1.6]
"JavaHome"="C:\Java\jre"
"RuntimeLib"="C:\Java\jre\bin\client\jvm.dll"
WEFX
8,1628 gold badges65 silver badges98 bronze badges
answered Apr 9, 2013 at 12:32
None of the above worked for me, unfortunately.
The error solved when I uninstalled the old JDK versions that were installed on my computer. I did it simply with the «Uninstall or change a program» tool (under the Control Panel).
answered Dec 17, 2019 at 12:13
I removed the «C:Program Files (x86)Herokubin» from PATH variable and the problem has gone. I think it is probably the Heroku require different version of Java. So check all directories in your PATH variable, remove the possible ones may have confliction.
answered Jan 23, 2018 at 14:24
HappyLiangHappyLiang
7221 gold badge5 silver badges9 bronze badges
If you face this error in cmd with another error as «could not find runtime environment» after you have done all settings in Environment Variable. Then you just need to run jre.exe in your jdk folder and reinstall it and then recheck it by java -version command. Hope it will help you.
Elletlar
3,1067 gold badges30 silver badges38 bronze badges
answered Aug 9, 2018 at 12:19
- rename file
"C:WindowsSystem32java.exe" to "C:WindowsSystem32java_old.exe"
- CMD —>
java -version
done.
answered Dec 13, 2018 at 3:11
In my case the regedit information was correct and the problem was solved by doing the below:
1) setting JAVA_HOME to jdk — set JAVA_HOME=C:Program FilesJava\bin
2) setting PATH to jre — set PATH=»C:Program FilesJava\bin»
answered Jun 9, 2019 at 17:24
after adding the requirements path as illustrated up and deleting C:ProgramDataOracleJavajavapath;. don’t forget to reopen your editor.
answered Nov 15, 2020 at 9:20
Go to CMD and type the following:
SET PATH=C:Program FilesJavajdk1.8.0_291bin
(here jdk1.8.0_291 represents your java version, it may differ for you)
answered Jun 21, 2021 at 20:26
2
Вопрос:
зачем я это получаю? Как я могу это исправить?
C:Usersash>java version
Error: Registry key 'SoftwareJavaSoftJava Runtime Environment'CurrentVersion'
has value '1.7.0_01', but '1.7' is required.
Error: could not find java.dll
Error: Could not find Java SE Runtime Environment.
Лучший ответ:
Переустановите JDK и установите системную переменную JAVA_HOME на свой JDK. (например, C:toolsjdk7)
И добавьте переменную JAVA_HOME в вашу системную переменную PATH
Введите в командной строке
echo %JAVA_HOME%
а также
java -version
Чтобы проверить, была ли ваша установка выполнена успешно.
Ответ №1
Принятое решение для переустановки ВСЕХ JDK было немного жестким.
Я тоже испытал эту проблему, и вот мои 2 цента:
Эта проблема возникла с тех пор, как я установил JDK 8 и все еще был установлен JDK 6. Мне нужны разные проекты, над которыми я работаю.
Я заметил, что у меня были как Пользователь, так и система %JAVA_HOME%
, поэтому я удалил переменную User %JAVA_HOME%
и оставил только системный.
Я также заметил, что в моей установке Oracle были некоторые исполняемые файлы Java, и я считаю, что те, в которых конфликтуют, поскольку мои установки Oracle и Java были в моей переменной %PATH%
.
Я удалил все пути Java из моей переменной %PATH%
и оставил только %JAVA_HOME%bin
в начале переменной, чтобы избежать конфликтов с установкой Oracle.
Ответ №2
У меня была аналогичная проблема после установки java 1.8.
Чтобы исправить это, перейдите в настройку Advance System → path и удалите
C:ProgramDataOracleJavajavapath;
Ответ №3
Удаление
C:ProgramDataOracleJavajavapath;
работать как шарм
Ответ №4
Убедитесь, что переменная JDK Path
направлена в папку bin
и находится в верхней части списка.
Если есть какая-либо другая запись с файлом с именем java (например, C:ProgramDataOracleJavajavapath
), она выполнит команду для этого файла вместо файла java в вашем JDK. Нет необходимости переустанавливать весь JDK, если ваши файлы по какой-либо причине не повреждены или повреждены.
Ответ №5
У меня была похожая проблема после установки Java 10.0
Чтобы это исправить, перейдите в настройки системы Advance → path и удалите
C:ProgramDataOracleJavajavapath;
Ответ №6
Мне пришлось удалить javapath Common Files из “Пути”, который конфликтовал, чтобы заставить его работать. Теперь, к счастью, Java -version работает просто отлично.
C:Program Files (x86)Common FilesOracleJavajavapath
Ответ №7
Вы можете использовать 32-разрядную версию java в 64-битной среде.
Экспорт формы куста реестра HKLMSoftwareJavaSoft и импорт в HKLMSoftwareWow6432NodeJavaSoft. Для 1.6 мне нужны только значения JavaHome и RuntimeLib.
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINESOFTWAREWow6432NodeJavasoft]
[HKEY_LOCAL_MACHINESOFTWAREWow6432NodeJavasoftJava Runtime Environment]
"CurrentVersion"="1.6"
[HKEY_LOCAL_MACHINESOFTWAREWow6432NodeJavasoftJava Runtime Environment1.6]
"JavaHome"="C:\Java\jre"
"RuntimeLib"="C:\Java\jre\bin\client\jvm.dll"
Ответ №8
Я редактировал мой путь, чтобы поместить Oracle JDK в начало пути и исправил его.
Ответ №9
Проблема: у нас была такая же проблема на нашем сервере Windows 2012. Мы использовали системную переменную среды JAVA_HOME, и в PATH мы использовали такие настройки:…% JAVA_HOME%/bin;… и никаких других настроек, связанных с java, в PATH не было.
Проблема заключалась в том, что у нас был пробел в конце значения переменной JAVA_HOME. Например, “C:Program FilesJavaJdk 1.8.0_172”, поэтому% JAVA_HOME%/bin означает “C:Program FilesJavaJdk 1.8.0_172bin”. Поэтому, поскольку значение было разделено по пробелам, и система пыталась найти java.exe в C:Program FilesJavaJdk 1.8.0_172, где его, очевидно, нет.
Решение было: удалите пробел из конца значения JAVA_HOME!
Ответ №10
Я удалил “C:Program Files (x86)Herokubin” из переменной PATH, и проблема исчезла. Я думаю, что, вероятно, Heroku требует другую версию Java. Поэтому проверьте все каталоги в вашей переменной PATH, удалите возможные из них, возможно, возникли проблемы.
Ответ №11
Если вы столкнулись с этой ошибкой в cmd с другой ошибкой “Не удалось найти среду выполнения” после выполнения всех настроек в переменной среды. Затем вам просто нужно запустить jre.exe в папке jdk, переустановить его, а затем перепроверить его командой java -version. Надеюсь, это поможет вам.
Ответ №12
- переименуйте файл
"C:WindowsSystem32java.exe" to "C:WindowsSystem32java_old.exe"
- CMD →
java -version
сделанный.
Ответ №13
- Удалить Java с компьютера
- Проверьте, что папка Java удалена из Program Files
- Проверьте реестр не имеет ни одного экземпляра Java
- Откройте системные переменные и удалите ТОЛЬКО путь Java из PATH
- Теперь установите новую версию снова.
- Установите путь в системных переменных.
Этот процесс очищает все следы Java, а затем установить свежую Java.
Примечание. Эта проблема возникает, когда выполняется многократная установка и удаление.
Ответ №14
Эта проблема обычно возникает в Windows, когда запись реестра “Java Runtime Environment” отсутствует или не соответствует установленному JDK. Несоответствие может быть связано с несколькими JDK.
Шаги для решения:
-
Откройте окно “Выполнить”:
Нажмите windows + R
-
Открыть окно реестра:
Наберите “regedit” и введите.
-
Перейдите по адресу:HKEY_LOCAL_MACHINESOFTWAREJavaSoft
-
Если среда выполнения Java отсутствует в JavaSoft, создайте новый ключ и дайте имя среде выполнения Java.
-
Для среды выполнения Java создайте строковый ключ “CurrenVersion” и укажите в качестве значения соответствующую версию:
-
Создайте новый подраздел 1.8.
-
Для 1.8 создайте строковый ключ с именем JavaHome со значением JRE home:
Ссылка: https://mybindirectory.blogspot.com/2019/05/error-could-not-find-javadll.html
Ответ №15
В моем случае информация о regedit была правильной, и проблема была решена с помощью следующих действий:
1) установить JAVA_HOME в jdk – установить JAVA_HOME = C:Program FilesJava\bin 2) установить PATH в jre – установить PATH = “C:Program FilesJava\bin”