Two Laptop Bag*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Javadoc package Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Javadoc package" Watch "Javadoc package" New topic
Author

Javadoc package

Jakub Drzazga
Ranch Hand

Joined: Nov 14, 2008
Posts: 41
Hello I would like to create javadoc documentation for whole package.
I have only one file Yyy.java in xxx package.
Yyy.java is inside C:\xxx folder.
I tried to use command javadoc xxx command in C:\ and C:\xxx and always a had the same information:
Loading source files for package xxx...
javadoc: warning - No source files for package xxx
Constructing Javadoc information...
javadoc: warning - No source files for package xxx
javadoc: error - No public or protected classes found to document.
1 error
2 warnings

What I did wrong?
Alex Belisle Turcot
Ranch Hand

Joined: Apr 26, 2005
Posts: 516
I'm guessing this is not your real path (or your project's sources would be directly on c:\...)

Is C:\xxx really a package or the root directory of your sources ?
yyy.java should have "package xxx;" as its first line.

Otherwise your path should be something like:
  • C:\project\src\package1
  • C:\project\src\package1\FirstClass.java (with first line: "package package1;"


  • Regards,
    Alex
    Jakub Drzazga
    Ranch Hand

    Joined: Nov 14, 2008
    Posts: 41
    this is my file Yyy.java:

    package xxx;
    /**
    * xxxxxxxxxxxxxxxxx
    * @author Dziabol4
    *
    */
    public class Yyy {

    }

    Lokation of this file is :
    C:\xxx\Yyy.java

    And "javadoc xxx" doesn't work fine.
    Alex Belisle Turcot
    Ranch Hand

    Joined: Apr 26, 2005
    Posts: 516
    Hi,

    then if your structure is all fine, it should be a classpath problem.

    Your classpath should include the current directory.
    Type this first: set classpath=%classpath%;.;

    I reproduced your problem by removing the current directory (.) from the classpath.

    Regards,
    Alex
    Jakub Drzazga
    Ranch Hand

    Joined: Nov 14, 2008
    Posts: 41
    I have added ".;" to the classpath and it gives no results.

    Can just use javadoc generation from Eclipse? or is it prohibitted?
    Jakub Drzazga
    Ranch Hand

    Joined: Nov 14, 2008
    Posts: 41
    I'm sorry for last reply, it realy works

    Thank you very much Alex.

    PS Can I use Eclipse to generate javadoc?
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: Javadoc package
     
    Similar Threads
    Javadoc for packages
    javadoc for generating api's
    Invalid character in input error when using javadoc
    javadoc, doc-files, images are ignored
    getting error during javadoc