1

如何解决此问题 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:\>
4

3 回答 3

2

检查javadoc的帮助有编码/字符集的选项

我认为你应该设置-encodingwhich 是源的编码名称。

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

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

           % 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
于 2012-10-11T13:55:21.800 回答
1

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

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

例如:

javadoc -encoding "UTF-8" ...
于 2012-10-11T13:55:13.753 回答
0

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

  • encoding指定输入编码
  • docencoding指定输出编码
  • charset使 javadoc 包含带有编码信息的元标记
于 2012-10-11T13:59:59.500 回答