The folks on the jdk-compiler-dev list confirmed that the Java compiler API doesn’t support certain non-standard options such as ‘-XDignore.symbol.file’. (I don’t know which, if any, other options are affected.) They suggest the following solutions: * Use ‘javax.tools.JavaCompiler.run(InputStream, OutputStream, OutputStream, String…)’, which behaves exactly like the command-line compiler. The same is true for JDK5’s ‘com.sun.tools.javac.Main.compile(String…, PrintWriter)’, which is a supported API that won’t go away. The drawback of this approach is that we can’t use any of the advanced features that the compiler API offers, such as providing our own file manager. (Currently we aren’t using any of these features. I’ve heard that IDEA 12 uses them to speed up compilation.) * Put effort into translating user arguments such as ‘-XDignore.symbol.files’ into API calls. I’m still trying to get feedback on how this would work for this particular case.
See here for the archived mailing list thread: http://mail.openjdk.java.net/pipermail/compiler-dev/2013-October/007588.html