Java documentation

I cannot create documentation for this code, I think my coomad javadoc is wrong, I read about it, but don’t understand if anyone can fix javadoc cammand

class abc
{/** documentaion line 1
*
* */
public static void main(String a[])
{/** documentaion line 2
*
* */
System.out.println("documentation");
}
}
Error:
C: \ Program Files \ Java \ jdk1.6.0 \ bin> javac abc.java

C: \ Program Files \ Java \ jdk1.6.0 \ bin> java abc
documentation

C: \ Program Files \ Java \ jdk1.6.0 \ bin> javadoc abc
Loading source files for package abc ...
javadoc: warning - No source files for package abc
Constructing Javadoc information ...
javadoc: warning - No source files for package abc
javadoc: error - No public or protected classes found to document.
1 error
2 warnings
+5
source share
3 answers

In your case, you want to specify the file name instead of the package name.

javadoc abc.java

. - public . , -package -private Javadoc, .

, :

/**
 * class documentation here
 */
public class abc
{

    /** 
     * method documentation here 
     */
    public static void main(String a[])
    {
      /**
       * this will be ignored.
       */
       System.out.println("documentation");
    }

}
+6

, , , . , , , :

javadoc -private *.java

.

+3

, Javadoc public protected (, ).

.

, Javadoc ( JAR ), .

+2
source

All Articles