How to generate javadoc documentation with umlauts?

亡梦爱人 提交于 2019-12-02 17:05:00
robinr

See the -charset, -encoding and -docencoding flags for the javadoc command.

  • -encoding specifies the input encoding
  • -docencoding specifies the output encoding
  • -charset makes javadoc include a meta tag with encoding info
FeelGood

Modified from Eclipse javadoc in utf-8:

Project -> Generate Javadoc -> Next -> on the last page, in Extra Javadoc options write:

-encoding UTF-8 -charset UTF-8 -docencoding UTF-8

If you generate your javadoc with an ant task and you use UTF-8 you can do:

<javadoc encoding="UTF-8" charset="UTF-8" docencoding="UTF-8" sourcepath="yoursources" destdir="yourdocdir" />

When generating the javadoc with Gradle add the following to your build.gradle file:

javadoc {
    options.encoding = 'UTF-8'
    options.docEncoding = 'UTF-8'
    options.charSet = 'UTF-8'
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!