0

I installed the Java 8 JRE at C:\Program Files\Java\bin and when I call java -version on the C: drive I get the expected result. If I make the same call on the E:Drive, I get the 'java' is not recognized ... error.

However, if I run the cmd as administrator, I can successfully call Java.

Both my PATH and JAVA_HOME system vars on the E: and C: drives point to C:\Program Files\Java\bin

I know this seems very basic but I've never worked with Java and am only using it now for JMeter

8
  • 3
    in your path (e.g. echo %path%) is there maybe no absolute path for java? E.g. instead of ...;C:\Program Files\Java\bin;... it contains only ...;\Program Files\Java\bin;... which would only resolve correctly while on C:. The java installers should handle this correctly though, so it would most likely be something you did manually. Uninstalling all java, checking for leftovers and then reinstalling might also help.
    – zapl
    Apr 10, 2019 at 8:36
  • @zapl both path and JAVA_HOME point to full paths C:\Program Files\Java\bin
    – rory
    Apr 10, 2019 at 8:49
  • 1
    What is the output of where java? If you installed java with the oracle installer it puts a "special" entry in front of your PATH variable.
    – DrHopfen
    Apr 10, 2019 at 9:44
  • 1
    @DrHopfen ahhhh... I see someone else had already installed java at C:\Program Files (x86)\Common Files\Oracle\Java\javapath\java.exe
    – rory
    Apr 10, 2019 at 9:46
  • @rory that someone is probably the official installer
    – zapl
    Apr 10, 2019 at 10:02

0

You must log in to answer this question.

Browse other questions tagged .