- This topic has 2 replies, 2 voices, and was last updated 21 years, 1 month ago by
David Beckedorff.
-
AuthorPosts
-
David BeckedorffMemberWhen 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.jarThis 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
Scott AndersonParticipantDoes this mean that it’s not a good idea to add JARs to the library containers?
That’s exactly what it means. 🙂 Our library container is not a general purpose thing, yet.
What if I added (if this is a supported feature) my own library containers?
You can’t because it’s not supported in Eclipse we haven’t added it as a general capability to MyEclipse. It is an open enhancement request though.
BTW, where do you recommend placing common libraries (that need to be visible to the EJB and Web components) in a MyEclipse J2EE project?
I’d place them in the top level of my EAR project and add them to my Manifest class-path entry so that they can be seen by the ejb project. Anything visible to the ejb project is visible to any web projects that use it due to the classloader hierarchy.
David BeckedorffMemberRemoving my JAR libraries from the J2EE 1.3 container and adding them back as external libraries resolved the Javadoc classpath problem.
-David
-
AuthorPosts