0

Why and how come java.exe appeared in "C:\Program Files (x86)\Common Files\Oracle\Java\javapath\java.exe", on Windows 10, and even more surprisingly - overridden my OpenJDK's java.exe binary, out of a sudden, which I have as an explicit System Variable, in the environment variables?

Just got some awkward behaviour, after which, decided to check where java, which got me this:

C:\Program Files (x86)\Common Files\Oracle\Java\javapath\java.exe
my actual OpenJDK 11 distribution\binaries

And it happened on its own.

What is this?

Update:
I have found it in the PATH system variable and just removed. I hope Windows OS won't start to misbehave due to this.. but I still wonder HOW this got there and HOW it has overridden my local Java installation.

1 Answers1

1

Apparently that "...\javapath..." entry is prepended to the PATH by the Oracle Java installer in Java 8. It is also possible that later Oracle Java installers do this too.

Source: https://douglascayers.com/2015/05/30/how-to-set-custom-java-path-after-installing-jdk-8/

And it happened on its own.

This shouldn't happen spontaneously. I posit that you actually ran an Oracle Java installer, or possibly some other installer that had an embedded Java installer.

I have found it in the PATH system variable and just removed. I hope Windows OS won't start to misbehave due to this

Windows per se doesn't depend on Java. You won't break Windows.

It is possible that some 3rd-party software that you installed might break; e.g. if that software specifically requires a different version of Java to the Java 11 which what is current on your PATH.

However, if it does you can always undo the change. (I wouldn't worry about this.)

Stephen C
  • 551
  • 4
  • 18