Solved

Problem using Doc Check Doclet

Posted on 2004-09-23
20
196 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
  • 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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
groupNoAdj 7 97
java 8 lambda expresssions exception handling 3 91
java stored proc example 9 32
jsp insert to database example 2 24
For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

803 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