1

When I run on console javac -version, I get the version number as 11.0.2, but when I run java -version I get the following error:

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

What should I do about this?

Which version of JRE do I need to install for JDK 11.0.2,so that I won't get any compatibility issues which executing java code?

2
  • How did you install which version of Java? Commented Feb 13, 2019 at 14:57
  • Have you seen this? stackoverflow.com/questions/6362037/… Commented Feb 13, 2019 at 14:58

1 Answer 1

2

Check path. To make sure that Windows can find the Java compiler and interpreter:

Select Start -> Computer -> System Properties -> Advanced system settings -> Environment Variables -> System variables -> PATH.

Prepend C:\Program Files\Java\jdk1.x.x\bin to the beginning of the PATH variable.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks, It helped...!

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.