I was trying to set up Eclipse for trying my hand at Android app dev.
I downloaded Eclipse and tried to run it... discovered I needed Java JDK. Googled and found JDK 7u40 (jdk-7u40-windows-x64.exe) and installed it. The install seemed to have gone dandy but when I tried to run Eclipse I got an error as well as if I try java version
in cmd.
Error: opening registry key 'Software\JavaSoft\Java Runtime Environment'
Error: could not find java.dll
Error: Could not find Java SE Runtime Environment.
I went to regedit, HKEY_LOCAL_MACHINE/SOFTWARE/JavaSoft and Java Runtime Environment
doesn't exist in there. Seems like this is more of a symptom than the root cause of my problems.
My PATH looks like
PATH=C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program File
s (x86)\Common Files\Microsoft Shared\Windows Live;C:\Windows\system32;C:\Window
s;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Progra
m Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\Window
s Live\Shared;C:\Program Files (x86)\Common Files\Acronis\SnapAPI\;C:\AIR\bin;C:
\Program Files (x86)\nodejs\;C:\SDK\Android\tools;C:\SDK\Android\platform-tools;
C:\SDK\ANT\apache-ant-1.9.2\bin;C:\Program Files\Java\jdk1.7.0_40\bin\
%JAVA_HOME% = C:\Program Files\Java\jdk1.7.0_40
I'm running Windows 7 Pro 64-bit
I did already read through Error when checking Java version: could not find java.dll and linked materials
By default, the installer places a copy of the runtime environment in the C:\Program Files\Java\j2re1. 4.2 directory. In addition, if no more recent version is already installed on the machine, the installer puts copies of the java and javaw application-launcher executables in the Microsoft Windows system directory.
If you have wondered how to fix Java issues, reinstalling it can help you. To fix the Java Runtime Environment not found error, make sure to have the latest version of Java. Download the JRE version that corresponds with your system type so you won't deal with other types of Java issues.
Finally found a forum post that outlined what the registry is supposed to look like when not broken.
HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment
CurrentVersion
= 1.7
HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\1.7
JavaHome
= C:\Program Files\Java\jre7
Running cmd java -version
and Eclipse now works
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With