import com.sun.javadoc.*;
import org.apache.log4j.Logger;
public class ListClass {
public static final Logger log = Logger.getLogger("ListClass");
public static boolean start(RootDoc root) {
ClassDoc[] classes = root.classes();
for (int i = 0; i < classes.length; ++i) {
System.out.println(classes[i]);
}
return true;
}
}
to compile: javac -cp tools.jar;log4j-1.2.17.jar ListClass.java
to run: javadoc -doclet ListClass -docletpath . -classpath log4j-1.2.17.jar;tools.jar ListClass.java
This will generate a NoClassDefFoundError. But if I remove the static keyword, it works fine. Any ideas how to make this work with the static keyword?
This made it work as suggested by my boss.
javadoc -doclet ListClass -docletpath .;log4j-1.2.17.jar -classpath log4j-1.2.17.jar;tools.jar ListClass.java