0

I am getting this error when I run Java from C:

C:\>java -version
Error: opening registry key 'Software\JavaSoft\Java Runtime Environment'
Error: could not find java.dll
Error: Could not find Java SE Runtime Environment.

However, it works fine if I call it from installation directory.

C:\Java\bin>java -version
java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b17)
Java HotSpot(TM) Client VM (build 23.25-b01, mixed mode, sharing)

I have the installation directory path in my %PATH% environment variable.

C:\>echo %PATH%
C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\java\bin
C:\>echo %JAVA_HOME%
C:\Java

What else I am missing in here ?

ARH
  • 1,355
  • 3
  • 18
  • 32

1 Answers1

1

looks similar to this Java Error opening registry key

as a final step try reinstalling java

Community
  • 1
  • 1
KDP
  • 1,481
  • 7
  • 13