Learn how to generate javadoc

Hi' i'm new for javadoc tools. i think somebody want to help me. Why i can't generate javadoc from this code :

import java.io.*;

publicclass maintest

{

public maintest()

{

try

{

File file =new File("C:/source/Console.java");

System.out.println(file.exists());

System.exit(0);

}

catch(Exception e)

{

e.printStackTrace();

}

}

publicstaticvoid main(String[] args)

{

new maintest();

}

}

when i try to generate that code, i got this exception :

C:\source>javadoc maintest.java

Loading source file maintest.java...

Constructing Javadoc information...

Standard Doclet version 1.5.0_04

Building treefor all the packages and classes...

Generating maintest.html...

java.lang.IllegalArgumentException

at sun.net.www.ParseUtil.decode(ParseUtil.java:183)

at sun.misc.URLClassPath$FileLoader.<init>(URLClassPath.java:863)

at sun.misc.URLClassPath$3.run(URLClassPath.java:319)

at java.security.AccessController.doPrivileged(Native Method)

at sun.misc.URLClassPath.getLoader(URLClassPath.java:313)

at sun.misc.URLClassPath.getLoader(URLClassPath.java:290)

at sun.misc.URLClassPath.findResource(URLClassPath.java:141)

at java.net.URLClassLoader$2.run(URLClassLoader.java:362)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findResource(URLClassLoader.java:359)

at java.lang.ClassLoader.getResource(ClassLoader.java:977)

at java.lang.ClassLoader.getResourceAsStream(ClassLoader.java:1159)

at javax.xml.parsers.SecuritySupport$4.run(SecuritySupport.java:72)

at java.security.AccessController.doPrivileged(Native Method).......

What's wrong? i'm using java 1.5.0_04.

Thanks a lot...

[2582 byte] By [hudoqa] at [2007-11-26 12:35:17]
# 1

Hmmm. I copied and pasted your code into maintest.java and it runs just fine on LInux.. Is it because you have forward slashes instead of backslahes in the path string?

Or perhaps you have classpath set? If so, unset it (or pass in -classpath "")

$ javadoc maintest.java

Loading source file maintest.java...

Constructing Javadoc information...

Standard Doclet version 1.5.0_07

Building tree for all the packages and classes...

Generating maintest.html...

Generating package-frame.html...

Generating package-summary.html...

Generating package-tree.html...

Generating constant-values.html...

Building index for all the packages and classes...

Generating overview-tree.html...

Generating index-all.html...

Generating deprecated-list.html...

Building index for all classes...

Generating allclasses-frame.html...

Generating allclasses-noframe.html...

Generating index.html...

Generating help-doc.html...

Generating stylesheet.css...

dhkramera at 2007-7-7 15:59:22 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...
# 2
Hi' sory for late reply, i already solve it. my problem is, java have a bug with this javadoc. see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6219854Thanks for your answer.
hudoqa at 2007-7-7 15:59:22 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...