In order to use a custom Doclet, instead of the default one, one needs to specify the -doclet and -docletpath options. The Doclets may themselves require some options to be specified but that another thing. For now, let us start with a simple example.

First, download the binary from

This is

package demo;

public class Hello {
     * Prints the words "Hello World".
    public static void main(String[] args) {
        System.out.println("Hello World");

This is the javadoc command:

    -doclet info.mikaelsvensson.devtools.doclet.xml.XmlDoclet
    -docletpath doclet-1.2.2.jar standard
    -output javadoc-hello.xml

This is the resulting javadoc-hello.xml:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <package name="demo">
        <class abstract="false" access="public" extends="java.lang.Object" interface="false" name="Hello" qualified-name="demo.Hello" serializable="false">
                <method abstract="false" access="public" constructor="false" final="false" name="main" partofproperty="false" static="true" synchronized="false">
                        <parameter type="java.lang.String"/>
                    <returns type="void"/>
                    <comment format="html">
                        <p>Prints the words "Hello World".</p>

Back to top

Reflow Maven skin by Andrius Velykis.