Javadoc无法识别doctitle选项/标志 [英] Javadoc does not recognize doctitle option/flag

查看:138
本文介绍了Javadoc无法识别doctitle选项/标志的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在通过gradle使用doclet运行javadoc,并且当我运行javadoc/doclet任务时,我收到下一个错误:

I am running javadoc with my doclet through gradle, and when I am running my javadoc/doclet task, I am receiving the next error:

error - invalid flag: -doctitle

然后是下一个用法表

usage: javadoc [options] [packagenames] [sourcefiles] [@files]
-overview <file>          Read overview documentation from HTML file
-public                   Show only public classes and members
-protected                Show protected/public classes and members (default)
-package                  Show package/protected/public classes and members
-private                  Show all classes and members
-help                     Display command line options and exit
-doclet <class>           Generate output via alternate doclet
-docletpath <path>        Specify where to find doclet class files
-sourcepath <pathlist>    Specify where to find source files
-classpath <pathlist>     Specify where to find user class files
-exclude <pkglist>        Specify a list of packages to exclude
-subpackages <subpkglist> Specify subpackages to recursively load
-breakiterator            Compute 1st sentence with BreakIterator
-bootclasspath <pathlist> Override location of class files loaded
                          by the bootstrap class loader
-source <release>         Provide source compatibility with specified release
-extdirs <dirlist>        Override location of installed extensions
-verbose                  Output messages about what Javadoc is doing
-locale <name>            Locale to be used, e.g. en_US or en_US_WIN
-encoding <name>          Source file encoding name
-quiet                    Do not display status messages
-J<flag>                  Pass <flag> directly to the runtime system

有人对Javadoc为什么不接受该标志有任何想法吗?从理论上讲,我是从jdk1.6的tools.jar运行javadoc的.我认为javadoc总是会接受该doctitle选项.谢谢您的时间!

Does anyone have an idea from why Javadoc is not accepting that flag? In theory, I am running the javadoc from tools.jar from jdk1.6. I thought it was something that javadoc would always accept that doctitle option. Thank you for your time!

编辑:该doctitle选项是Standard Doclet的一部分,因此看来我无法访问Standard Doclet选项.

EDIT: That doctitle option is part of the Standard Doclet, so it looks like I am not being able to access the Standard Doclet options.

推荐答案

知道了! 问题出在Doclet本身.我没有扩展标准Doclet(公共类MyDoclet扩展了标准{"),因此标准Doclet的标志不可用(文档标题是标准Doclet的标志的一部分).

Got it! The problem was in the Doclet itself. I was not extending the Standard Doclet ("public class MyDoclet extends Standard {"), so the flags from the Standard Doclet were not available (and doctitle is part of the flags of the Standard Doclet).

感谢Paulo让我重新考虑"我的回答:-)

Thanks to Paulo for making me "re-think" my answer :-)

这篇关于Javadoc无法识别doctitle选项/标志的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆