It just doesn't work, sorry.
XJC plugins must extend the com.sun.tools.xjc.Plugin class. But XJC, which is included in the JDK and is available as xjc binary (for example, xjc.exe for Windows), is repackaged: com.sun.tools.xjc → com.sun.tools.internal.xjc .
So, on the vanilla xjc command line, you do not have the class com.sun.tools.xjc.Plugin (extensions for XJC plugins), but com.sun.tools.internal.xjc.Plugin .
So the xjc CLI just doesn't work with XJC plugins. The only plugins that still work are those that are also repackaged. (Example com.sun.tools.internal.xjc.addon.code_injector.PluginImpl .)
If you need a command line, try to figure out the parameters java -cp ... , this is the only way to make it work with third-party XJC plugins, such as XEW or JAXB2-Basics.
source share