javadoc: No packages or classes specified.
usage: javadoc [options] [packagenames] [sourcefiles] [classnames] [@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
-doclet <class>           Generate output via alternate doclet
-docletpath <path>        Specify where to find doclet class files
-1.1                      Generate output using JDK 1.1 emulating doclet
-sourcepath <pathlist>    Specify where to find source files
-classpath <pathlist>     Specify where to find user class files
-bootclasspath <pathlist> Override location of class files loaded
                          by the bootstrap class loader
-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
-J<flag>                  Pass <flag> directly to the runtime systemProvided by Standard doclet:
-d <directory>            Destination directory for output files
-use                      Create class and package usage pages
-version                  Include @version paragraphs
-author                   Include @author paragraphs
-splitindex               Split index into one file per letter
-windowtitle <text>       Browser window title for the documenation
-doctitle <html-code>     Include title for the package index(first) page
-header <html-code>       Include header text for each page
-footer <html-code>       Include footer text for each page
-bottom <html-code>       Include bottom text for each page
-link <url>               Create links to javadoc output at <url>
-linkoffline <url> <url2> Link to docs at <url> using package list at <url2>
-group <name> <p1>:<p2>.. Group specified packages together in overview page
-nodeprecated             Do not include @deprecated information
-nosince                  Do not include @since information
-nodeprecatedlist         Do not generate deprecated list
-notree                   Do not generate class hierarchy
-noindex                  Do not generate index
-nohelp                   Do not generate help link
-nonavbar                 Do not generate navigation bar
-serialwarn               Generate warning about @serial tag
-charset <charset>        Charset for cross-platform viewing of generated docume
ntation.
-helpfile <file>          Include file that help link links to
-stylesheetfile <path>    File to change style of the generated documentation
-bottom <html-code>       Include bottom text for each page
-link <url>               Create links to javadoc output at <url>
-linkoffline <url> <url2> Link to docs at <url> using package list at <url2>
-group <name> <p1>:<p2>.. Group specified packages together in overview page
-nodeprecated             Do not include @deprecated information
-nosince                  Do not include @since information
-nodeprecatedlist         Do not generate deprecated list
-notree                   Do not generate class hierarchy
-noindex                  Do not generate index
-nohelp                   Do not generate help link
-nonavbar                 Do not generate navigation bar
-serialwarn               Generate warning about @serial tag
-charset <charset>        Charset for cross-platform viewing of generated docume
ntation.
-helpfile <file>          Include file that help link links to
-stylesheetfile <path>    File to change style of the generated documentation

解决方案 »

  1.   

    javados:
    选项:
    -classpath <path> 指定类库和源文件参数的路径表
    -d <directory>    生成的API文档的存放路径
    -verbose          显示生成过程的详细信息javados分析java源文件中的声明和注释,规格化其公共的和保护的API,形成HTML页面。此外生成类列表,类层次结构和所有API的索引。
    用户可以用包名或用一系列的java源程序名作参数。默认输出为html页面,也可以使用doctype选项来生成Frame Maker软件可以使用的MIF格式文件。
    由于javadoc可以自动对类,界面,方法和变量声明进行分析,形成文档,所以用户可以在java源程序中插一些html标记的特殊格式的注释。
    doc注释标记为:
    /**DOC注释*/
    用户可以在注释中插入html标记,也可以插入javadoc标记(由@开头)。
      

  2.   

    javadoc –sourcepath <path_to_source>/*.java
      

  3.   

    正着反着都不对,为何?D:\javaxml\javaxml\ch03>javadoc -sourcepath d:/javaxml/javaxml/ch03/*.javaD:\javaxml\javaxml\ch03>javadoc -sourcepath d:\javaxml\javaxml\ch03\*.javajavadoc: No packages or classes specified.
      

  4.   

    javadoc -sourcepath c:\hello\ WarehouseImpl.java
    在当前路径下有WarehouseImpl.java这个文件
      

  5.   

    你别用×试试,一个一个的文件用javadoc命令。
      

  6.   

    比如我要生成myrmi下所有的java 文件的doc
    目录结构是c:\test\myrmi\....
    你应该:
    C:\test>javadoc -sourcepath myrmi/*.java
      

  7.   

    这个一定要加到faq 里,赫赫。
      

  8.   

    d:\test\Test.java内容为:public class Test{
      int test = 0;
      public Test(){
      }
    }D:\test>javadoc -sourcepath d:\test\Test.java
    还是javadoc: No packages or classes specified.呀~~后来家上包名package test;也不行:(怎么回事,这么笨笨?
      

  9.   

    javadoc -sourcepath c:\hello\ WarehouseImpl.java
    注意,我这个c:\hello\ 是随便些的,不存在, 后面还有空格,
    你的try:
    D:\test>javadoc -sourcepath  c:\hell0\  Test.java另外
    比如我要生成myrmi下所有的java 文件的doc
    目录结构是c:\test\myrmi\....
    你应该:
    C:\test>javadoc -sourcepath myrmi/*.java
    ---------------------你难道没看懂?
      

  10.   

    呵呵~~都是空格惹的祸!
    特别感谢qxjavajava(射手座 =---&gt; 恭喜发财)