0

I am having trouble setting up the JDK. When testing to see if everything if working, I am unable to find the version of the java interpreter. tl;dr at bottom.

I am following these instructions from the textbook "Java in Easy Steps". If you want to see the steps I am following i provided a link below to a preview of the book. From the front cover, click the next page button 14 times to get to the page I am looking at. This book tells how to install version 9 of the JDK, but I am

Link: https://books.google.com/books/about/Java_in_easy_steps_5th_edition.html?id=F4q9BgAAQBAJ&printsec=frontcover&source=kp_read_button#v=onepage&q&f=false

So far, I have: 1) Installed the JDK 2) Added the location of Java's bin sub-directory to the system variable named "Path" (C:\Program Files\Java\jdk-11.0.2\bin) 3) Opened a command prompt and checked the versions of javac and jshell using "javac -version" and "jshell -version". They both matched (11.0.2)

When I try to check the version of the interpreter by typing "java -version", I get the following errors. 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.

So far, I have uninstalled the JDK and deleted all files associated with it and reinstalled the JDK and reset the path. But once again I cannot check the version of the java interpreter due to the errors mentioned above. Any help would be greatly appreciated.

tl'dr installed JDK 11 javac -version works jshell -version works java -version doesnt. gives me the errors

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.

3
  • 1
    So far, I can partly solve the problem by navigating to the bin folder manually, then checking for the version. I can actually see the java application in the bin folder. i tried adding the folder where my Hello.java and Hello.class are to the system paths, but this didn't work (I reopened the command prompt to update it). Now the only thing I can think of what to do is add Hello.class to the jdk-11.0.2 bin. But I'm afraid to do that. I'm not experienced enough to predict that would do. I do not like to mess with bins.
    – thomasbh
    Jan 24, 2019 at 3:59
  • Skip old unchecked directions from a textbook and go to the real source - docs.oracle.com/javase/10/install/…
    – ivanivan
    Jan 24, 2019 at 4:02
  • Thanks! Although it was mostly similar and didn't have a solution to my specific problem, that page gave me the tip on using the full path to get to the interpreter. So now I can run programs. Awesome.
    – thomasbh
    Jan 24, 2019 at 4:17

0

You must log in to answer this question.

Browse other questions tagged .