Solved

Problem using Doc Check Doclet

Posted on 2004-09-23
20
200 Views
Last Modified: 2010-03-31
I am trying to use Doc Check Doclet to generate a list of missing comments.
my package structure is something like

com\pack1\pack2
com\pack1\pack2\pack3
com\pack1\pack2\pack4
com\pack1\pack2\pack5

com\pack1\pack2\pack3\pack6
com\pack1\pack2\pack3\pack7

com\pack1\pack2\pack3\pack6\pack8

.... so on


i am trying to use the following command from prompt.

E:\>javadoc -doclet com.sun.tools.doclets.doccheck.DocCheck com  -subpackages co
m.pack1.pack2  -d test

But it gives me follwoing warning

Loading source files for package com...
javadoc: warning - No source files for package com
Constructing Javadoc information...
javadoc: warning - No source files for package com

How do i correct this.



0
Comment
Question by:thomas908
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 9
  • 6
  • 5
20 Comments
 
LVL 92

Expert Comment

by:objects
ID: 12140432
try using the -sourcepath option to specify source location(s)
0
 
LVL 8

Author Comment

by:thomas908
ID: 12140448
done this. still no success

E:\>javadoc -doclet com.sun.tools.doclets.doccheck.DocCheck com -sourcepath "e:\
 com" -subpackages com.dassault.mt.main  -d test
0
 
LVL 92

Expert Comment

by:objects
ID: 12140458
where are the sources its not finding?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 8

Author Comment

by:thomas908
ID: 12140470
in e:\  drive
in directory structure

e:\com\pack1 ... etc

0
 
LVL 92

Assisted Solution

by:objects
objects earned 100 total points
ID: 12140480
think you need to specify the base directory, ie. e:\

running with -verbose may also help sort out the problem
0
 
LVL 12

Expert Comment

by:Giant2
ID: 12140503
try:

javadoc -doclet com.sun.tools.doclets.doccheck.DocCheck -subpackages com.pack1.pack2  -d test TheDirectoryWhereYourProjectStart


0
 
LVL 12

Expert Comment

by:Giant2
ID: 12140507
But, why you need -subpackages oprtion?
0
 
LVL 8

Author Comment

by:thomas908
ID: 12140542
>> But, why you need -subpackages oprtion?

Becoz i have a lot of subpackages under com.
is there any otehr way of doing it ?
I am sure using subpackages is not the best way of doing it as i have to specify wach subpackage which r about 40 in number. Something like

-subpackages com.pack1: com.pack1.pack2: ....


0
 
LVL 92

Expert Comment

by:objects
ID: 12140566
why don't you just list the packages you want to process, or are there a lot?
0
 
LVL 8

Author Comment

by:thomas908
ID: 12140567
doing something like

E:\>javadoc -doclet com.sun.tools.doclets.doccheck.DocCheck com.pack1.pack2 -ver
bose>VerboseLog.txt -classpath d:\Libs\photos.jar;d:\Libs\log4j-1.2.7.jar;d:\Lib
s\mysql-connector-java-3.0.6-stable-bin.jar;d:\Libs\datasocket.jar; -sourcepath e:\ com -d test
0
 
LVL 8

Author Comment

by:thomas908
ID: 12140583
>>why don't you just list the packages you want to process, or are there a lot?

there are about 40 packages
0
 
LVL 8

Author Comment

by:thomas908
ID: 12140590
using subpackages option like

E:\>javadoc -doclet com.sun.tools.doclets.doccheck.DocCheck com -verbose>Verbose
Log.txt -classpath d:\Libs\photos.jar;d:\Libs\log4j-1.2.7.jar;d:\Libs\mysql-conn
ector-java-3.0.6-stable-bin.jar;d:\Libs\datasocket.jar; -sourcepath e:\ com -subpackages com.pack1.pack2.pack3:com.pack1.pack2.pack4  -d test

seems to be working. But it makes me specify names of all the subpackages, which is a problem and secondly its also giving warnings like

javadoc: warning - No source files for package com
javadoc: warning - No source files for package com
e:\com\dassault\mt\aircraft\panels\armament\ScrollablePanel.java:22: warning - @
author tag has no arguments.

0
 
LVL 8

Author Comment

by:thomas908
ID: 12140594
using subpackages option like

E:\>javadoc -doclet com.sun.tools.doclets.doccheck.DocCheck com -verbose>Verbose
Log.txt -classpath d:\Libs\photos.jar;d:\Libs\log4j-1.2.7.jar;d:\Libs\mysql-conn
ector-java-3.0.6-stable-bin.jar;d:\Libs\datasocket.jar; -sourcepath e:\ com -subpackages com.pack1.pack2.pack3:com.pack1.pack2.pack4  -d test

seems to be working. But it makes me specify names of all the subpackages, which is a problem and secondly its also giving warnings like

javadoc: warning - No source files for package com
javadoc: warning - No source files for package com
e:\com\pack1\pack2\pack3\pack4\pack5\Scroll.java:22: warning - @
author tag has no arguments.

0
 
LVL 12

Expert Comment

by:Giant2
ID: 12140608
>javadoc: warning - No source files for package com
because you put com after DocCheck (javadoc -doclet com.sun.tools.doclets.doccheck.DocCheck com -verbose... )

I believe this could be better:
javadoc -doclet com.sun.tools.doclets.doccheck.DocCheck com.pack1.pack2 -verbose -classpath d:\Libs\photos.jar;d:\Libs\log4j-1.2.7.jar;d:\Libs\mysql-connector-java-3.0.6-stable-bin.jar;d:\Libs\datasocket.jar; -sourcepath e:\ -subpackages com.pack1.pack2.pack3:com.pack1.pack2.pack4 -d test com
0
 
LVL 12

Expert Comment

by:Giant2
ID: 12140612
try this (I forget a com.pack1.pack2 in the statement):

javadoc -doclet com.sun.tools.doclets.doccheck.DocCheck -verbose -classpath d:\Libs\photos.jar;d:\Libs\log4j-1.2.7.jar;d:\Libs\mysql-connector-java-3.0.6-stable-bin.jar;d:\Libs\datasocket.jar; -sourcepath e:\ -subpackages com.pack1.pack2.pack3:com.pack1.pack2.pack4 -d test com
0
 
LVL 92

Expert Comment

by:objects
ID: 12140624
ant makes these types of tasks a lot simpler :)
0
 
LVL 8

Author Comment

by:thomas908
ID: 12140633
Even this gives 1 warning
javadoc: warning - No source files for package com


I removed com as the last word and warning in gone.

javadoc -doclet com.sun.tools.doclets.doccheck.DocCheck -verbose -classpath d:\Libs\photos.jar;d:\Libs\log4j-1.2.7.jar;d:\Libs\mysql-connector-java-3.0.6-stable-bin.jar;d:\Libs\datasocket.jar; -sourcepath e:\ -subpackages com.pack1.pack2.pack3:com.pack1.pack2.pack4 -d test

But problem of subpackages still remains. Do i need to specify names os all the 40 subpackages or is there a easier way out.
0
 
LVL 12

Accepted Solution

by:
Giant2 earned 400 total points
ID: 12140676
> all the 40 subpackages or is there a easier way out
No. You can specify only the main.
For example if you have packages:
a
a.b
a.c
a.b.r
a.b.g.t

you can simply put:
-subpackages a
It generates all from package a to all its subpackages.
(see: http://java.sun.com/developer/community/chat/JavaLive/2003/jl1014.html and search in the page -subpackages)

>javadoc: warning - No source files for package com
are you sure that in e:\ there is a directory com where there are all the other packages (java code!).
0
 
LVL 8

Author Comment

by:thomas908
ID: 12140705
Thanks a lot for helping.
0
 
LVL 12

Expert Comment

by:Giant2
ID: 12140707
Thanks.
Happy to help you.
:)
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
throw exception 21 78
going to wrong jsp page 2 69
Selenium docs api java index 3 97
Overriding a method 3 12
An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Suggested Courses

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question