1

For some reason, the where java command (on windows) is not returning the location of my JDK. My JDK is at C:\Program Files\Java\jdk-10.0.1\bin All the correct executables are there (like java.exe)

Whenever I do "where java" in the console, I get this:

C:\Program Files (x86)\Common Files\Oracle\Java\javapath\javaw.exe
C:\ProgramData\Oracle\Java\javapath\javaw.exe

With neither of them being the correct jdk location.

Any ideas? I can provide further information if needed.

Edit: Also, it does return the correct location, but only whenever the cmd prompt is inside the same folder as the java.exe. (Whenever its in C:\Program Files\Java\jdk-10.0.1\bin)

2
  • 1
    Change your OS's path property Commented Sep 12, 2018 at 0:52
  • Wow. Thanks! It works. Just simply adding the JDK location to the Path environment variable fixed the problem. Commented Sep 12, 2018 at 0:56

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.