Which javac.exe is used by ant javac task?
问题 I am facing one problem. I renamed javac.exe on my machine and noticed that ant javac task still works fine. Does anybody know from where its getting javac.exe? 回答1: Actually, I believe, that by default Ant tries to execute the java compiler class directly with this code: try { Class c = Class.forName ("com.sun.tools.javac.Main"); Object compiler = c.newInstance (); Method compile = c.getMethod ("compile", new Class [] {(new String [] {}).getClass ()}); int result = ((Integer) compile.invoke