javadoc发生器

时间:2012-10-11 13:50:52

标签: java

如何解决这个问题 Microsoft Windows [版本6.1.7600] 版权所有(c)2009 Microsoft Corporation。保留所有权利。

C:\Users\Ramaraj>cd\

C:\>set path="D:\Program Files (x86)\Java\jdk1.6.0_35\bin";

C:\>javadoc D:\PersonAction.java -d D:\doc
Creating destination directory: "D:\doc\"
Loading source file D:\PersonAction.java...
D:\PersonAction.java:22: warning: unmappable character for encoding Cp1252
//σ«ÜΣ╣ëσ??Σ╕║reloadτÜäresultΘç?σ«Üσ?æσê░user.action, σà╢Σ╗ûresultσêÖµîëτàºconve
ntionΘ╗ÿΦ«ñ.
         ^
D:\PersonAction.java:22: warning: unmappable character for encoding Cp1252
//σ«ÜΣ╣ëσ??Σ╕║reloadτÜäresultΘç?σ«Üσ?æσê░user.action, σà╢Σ╗ûresultσêÖµîëτàºconve
ntionΘ╗ÿΦ«ñ.
          ^
D:\PersonAction.java:22: warning: unmappable character for encoding Cp1252
//σ«ÜΣ╣ëσ??Σ╕║reloadτÜäresultΘç?σ«Üσ?æσê░user.action, σà╢Σ╗ûresultσêÖµîëτàºconve
ntionΘ╗ÿΦ«ñ.
                               ^
D:\PersonAction.java:22: warning: unmappable character for encoding Cp1252
//σ«ÜΣ╣ëσ??Σ╕║reloadτÜäresultΘç?σ«Üσ?æσê░user.action, σà╢Σ╗ûresultσêÖµîëτàºconve
ntionΘ╗ÿΦ«ñ.
                                    ^
D:\PersonAction.java:32: warning: unmappable character for encoding Cp1252
        private Page<Person> page = new Page<Person>(15);//µ»?Θí╡5µ?íΦ«░σ╜ò
                                                             ^
D:\PersonAction.java:32: warning: unmappable character for encoding Cp1252
        private Page<Person> page = new Page<Person>(15);//µ»?Θí╡5µ?íΦ«░σ╜ò
                                                                   ^
D:\PersonAction.java:65: warning: unmappable character for encoding Cp1252
                //Φ«╛τ╜«Θ╗ÿΦ«ñµÄÆσ║?µû╣σ╝?
                                   ^
D:\PersonAction.java:65: warning: unmappable character for encoding Cp1252
                //Φ«╛τ╜«Θ╗ÿΦ«ñµÄÆσ║?µû╣σ╝?
                                         ^
D:\PersonAction.java:82: warning: unmappable character for encoding Cp1252
                addActionMessage("Σ┐?σ¡ÿµê?σèƒ");
                                    ^
D:\PersonAction.java:82: warning: unmappable character for encoding Cp1252
                addActionMessage("Σ┐?σ¡ÿµê?σèƒ");
                                          ^
D:\PersonAction.java:90: warning: unmappable character for encoding Cp1252
                        addActionMessage("σêáΘÖñµê?σèƒ");
                                                  ^
D:\PersonAction.java:110: warning: unmappable character for encoding Cp1252
        //-- Θí╡Θ?óσ▒₧µÇºΦ«┐Θù«σç╜µò░ --//
                 ^
D:\PersonAction.java:112: warning: unmappable character for encoding Cp1252
         * listΘí╡Θ?óµÿ╛τñ║τö¿µê╖σêåΘí╡σêùΦí¿.
                   ^
D:\PersonAction.java:1: illegal character: \187
package net.top.app.web.person;
 ^
D:\PersonAction.java:1: illegal character: \191
package net.top.app.web.person;
  ^
2 errors
13 warnings

C:\>

3 个答案:

答案 0 :(得分:2)

检查javadoc的帮助有编码/ charset的选项

我认为您应该设置-encoding这是您的来源的编码名称。

  

- 编码名称                指定源文件的编码名称,例如EUCJIS / SJIS。如果未指定此选项,则平台默认   使用转换器。

     

-charset名字                指定此文档的HTML字符集。该名称应该是IANA注册表中给出的首选MIME名称@                http://www.iana.org/assignments/character-sets。例如:

           % javadoc -charset "iso-8859-1" mypackage
         would insert the following line in the head of every generated page:

            <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

         This META tag is described in the HTML standard @
         http://www.w3.org/TR/REC-html40/charset.html#h-5.2.2. (4197265 and 4137321)

      Also see -encoding and -docencoding.

      -docencoding  name
         Specifies the encoding of the generated HTML files. The name should be a preferred MIME name as given in the IANA Registry @
         http://www.iana.org/assignments/character-sets. If you omit this option but use -encoding, then the encoding of the generated
     

HTML文件由。确定                -encoding。例如:

           % javadoc -docencoding "ISO-8859-1" mypackage

答案 1 :(得分:1)

您的源文件看起来与系统的默认编码(Windows-1252)具有不同的字符编码。

在调用javadoc工具并指定正确的编码时,在命令行上使用-encoding option。 (如果您不知道源文件的编码是什么,则必须找出答案。也许它是UTF-8。)

例如:

javadoc -encoding "UTF-8" ...

答案 2 :(得分:0)

您的编码似乎是错误的(也许您在注释或字符串常量中使用特殊字符)。你应该看一下javadoc command。有一些字符编码参数:

  • encoding指定输入编码
  • docencoding指定输出编码
  • charset使javadoc包含带编码信息的元标记