JVM does not find java.exe
. It doesn't even call it. java.exe
is called by the operating system (Windows in this case).
JAVA_HOME
is just a convention, usually used by Tomcat, other Java EE app servers and build tools such as Gradle
to find where Java lives.
The important thing from your point of view is that the Java /bin
directory be on your PATH
so Windows can find the .exe
tools that ship with the JDK: javac.exe
, java.exe
, jar.exe
, etc.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…