我正在尝试为多个包生成java文档,所以我有一个index.html,我可以通过编写为单个包生成它们,
javadoc packages/mypackage1/program/*.java
但我不能让它适用于多个包。我尝试使用javadoc @packages但是我得到了
error - cannot read packages <access is denied>
任何想法都会很棒!!
答案 0 :(得分:6)
javadoc -d [DESTINATION_FOLDER] -sourcepath [SOURCE_FOLDER] -subpackages [PACKAGE1]:[PACKAGE2]
例如,如果您的层次结构是:
然后您的命令行将如下所示:
javadoc -d [DESTINATION_FOLDER] -sourcepath /home/my_project/src -subpackages com:fr
答案 1 :(得分:0)
举个例子:
以下命令行将处理位于/ home / rudy / IdeaProjects / demo / src / main / java 和<下的com 和 LOR(指环王)下的所有软件包。 / strong> / home / rudy / IdeaProjects / demo / src / test / java /
请注意:
rudy@rudy-ThinkPad-T590:~$ javadoc -d /home/rudy/IdeaProjects/demo_doc
-sourcepath /home/rudy/IdeaProjects/demo/src/main/java/
:/home/rudy/IdeaProjects/demo/src/test/java/
-subpackages com:LOR
-private
rudy@rudy-ThinkPad-T590:~/IdeaProjects/demo/src/main/java$ ls -R
.: com LOR
./com: example
./com/example: demo
./com/example/demo: DemowApplication.java
./LOR: Race.java TolkienCharacter.java
rudy@rudy-ThinkPad-T590:~/IdeaProjects/demo/src/test/java$ ls -R
.: com
./com: example
./com/example: demo
./com/example/demo: AssertJTest.java DemowApplicationTests.java