IDEA 12: @NotNull instrumentation using javac2 task requires rt.jar in classpath of ANT script?

When I build my project from the command-line using ANT and the 'javac2' task to get @NotNull assertions, I need to explicitly add 'rt.jar' to the classpath in order to get the 'javac2' task to work.

This does not make a lot of sense to me and when using the regular 'javac' or the IDEA 11 version of the 'javac2' task this is not required.

I was wondering if this is intended behavior or a bug?


1 comment
Comment actions Permalink

Hi P.S. Heijnen,   Sorry for the late reply. Yes, this has been done deliberately. The compiler now is explicitly told against what classes the instrumentation should be performed. Previously instrumented classes were resolved against compiler's runtime classes, which is not good. Now the libraries from the JDK, used to run the compiler itself, does not influence classes that this compiler processes.   Regards,    Eugene,


Please sign in to leave a comment.