Passing options to compiler plug-in

Jonathan Gibbons jonathan.gibbons at
Tue Jan 29 23:03:40 UTC 2019

 From the javac help for extended options, "javac -X"

   -Xplugin:"name args"
         Name and optional arguments for a plug-in to be run

-- Jon

On 01/29/2019 02:35 PM, Gunnar Morling wrote:
> Hi,
> I'm working on a javac plug-in (i.e. implementing
> com.sun.source.util.Plugin) and would like to pass some options to it.
> I'm currently using annotation processor options (-A...), as that was
> the only way I could find to pass options unknown to javac. This
> creates a warning though "The following options were not recognized by
> any processor: ...". It's no big problem, but I'm curious whether
> there's a better way.
> The plug-in in question btw. is a tool for validating an application's
> (module-internal) architecture by comparing package relationships
> against a given model definition [1].
> Thanks,
> --Gunnar
> [1]

More information about the compiler-dev mailing list