What is the difference between using javac and javax.tools.JavaCompiler?
javac (as “java compiler”) is an executable, which could be theoretically even a platform-dependent executable or a script. This is called to compile a .java to a .class. On windows is its name javac.exe, and it is normally somewhere below C:\Program Files*\jdk*\bin. This compiler was developed in java as well. That means, if we start …