Solved

Problem using Doc Check Doclet

Posted on 2004-09-23
20
193 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
Comment Utility
try using the -sourcepath option to specify source location(s)
0
 
LVL 8

Author Comment

by:thomas908
Comment Utility
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
Comment Utility
where are the sources its not finding?
0
 
LVL 8

Author Comment

by:thomas908
Comment Utility
in e:\  drive
in directory structure

e:\com\pack1 ... etc

0
 
LVL 92

Assisted Solution

by:objects
objects earned 100 total points
Comment Utility
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
Comment Utility
try:

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


0
 
LVL 12

Expert Comment

by:Giant2
Comment Utility
But, why you need -subpackages oprtion?
0
 
LVL 8

Author Comment

by:thomas908
Comment Utility
>> 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
Comment Utility
why don't you just list the packages you want to process, or are there a lot?
0
 
LVL 8

Author Comment

by:thomas908
Comment Utility
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
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
LVL 8

Author Comment

by:thomas908
Comment Utility
>>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
Comment Utility
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
Comment Utility
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
Comment Utility
>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
Comment Utility
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
Comment Utility
ant makes these types of tasks a lot simpler :)
0
 
LVL 8

Author Comment

by:thomas908
Comment Utility
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
Comment Utility
> 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
Comment Utility
Thanks a lot for helping.
0
 
LVL 12

Expert Comment

by:Giant2
Comment Utility
Thanks.
Happy to help you.
:)
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now