I would like to know what JAVA_HOME is. Where do I set the path of javac.exe and java.exe. It is in environment variables? When I compile a Java program from command prompt, how does the JVM find javac.exe?
I would like to know what JAVA_HOME is. Where do I set the path
Share
JVM does not find
java.exe. It doesn’t even call it.java.exeis called by the operating system (Windows in this case).JAVA_HOMEis just a convention, usually used by Tomcat, other Java EE app servers and build tools such asGradleto find where Java lives.The important thing from your point of view is that the Java
/bindirectory be on yourPATHso Windows can find the.exetools that ship with the JDK:javac.exe,java.exe,jar.exe, etc.