When I generate Javadoc for my project (actually filtered down to one package), I get a lot of class not found errors from Javadoc in the console window — e.g. for Log4J’s Logger:
Loading source files for package mil.navy.fvm.skill…
Constructing Javadoc information…
C:\Eclipse\eclipse-2.1.2\data\XFVMEJB\src\mil\navy\fvm\skill\ComponentVO.java:13: package org.apache.log4j does not exist
import org.apache.log4j.Logger;
^
C:\Eclipse\eclipse-2.1.2\data\XFVMEJB\src\mil\navy\fvm\skill\ComponentVO.java:27: cannot resolve symbol
symbol : class Logger
location: class mil.navy.fvm.skill.ComponentVO
private static Logger logger = Logger.getLogger(ComponentVO.class);
When setting up log4j-1.2.8.jar in my build path, I just added it to MyEclipse’s J2EE 1.3 Library Container as:
C:\Tools\jakarta-log4j-1.2.8\dist\lib\log4j-1.2.8.jar
This works fine for the project’s build path, but the log4j jar does not get picked up in the javadoc classpath, which remains set to “classes”.
Does this mean that it’s not a good idea to add JARs to the library containers? That they should be added as external JARs so that they get picked up on the classpaths of all the standard Java tools? What if I added (if this is a supported feature) my own library containers? Then it would seem that the contained libraries would be invisible to some tools.
Or is there a way to tell javadoc to look into library containers when building its classpath?
BTW, where do you recommend placing common libraries (that need to be visible to the EJB and Web components) in a MyEclipse J2EE project? Or links to them which I gather is supported in ME 2.7.2 GA.
David