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
Solved

Problem using Doc Check Doclet

Posted on 2004-09-23
20
198 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
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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
javap bin 2 40
How to determine if a string is a valid SHA value 7 35
Java Restore security prompts not working 10 56
What browser will run Java? 7 54
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
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…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

840 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