i've added a java project to a j2ee web project's build path.
the java project holds hibernate classes and the j2ee project does not
recognize the hibernate ?
do i need to add all needed external jars twice ? that doesn't seem logical
especialy when thinking about deployment .
You will either need to create a "J2EE Module Dependency" (via
Project->Properties->J2EE Module Dependencies") between the dynamic web
project and your Java project rather than directly adding the Java project
to the build path as a project cp entry (the Web App Libraries cp container
will then expose it to the build path).
If the classes in your Java project that you wish to bundle in the WAR are
contained JARs on the Java project's build path, you will need to take an
additional step after: execute the QuickFix on the warning problem marker
associated with the cp entry for each of these JARs ("Classpath entry _ will
not be exported or published..."); this will add a WTP-specific cp entry
attribute that marks these cp entries for publish/export (and they will get
bundled in the WEB-INF/lib dir of the WAR along with the JAR for the Java
project). See the following enhancement covers better UI support for these
use case in the 3.0 timeframe: https://bugs.eclipse.org/bugs/show_bug.cgi?id=184094
"Amnon" <firstname.lastname@example.org> wrote in message
> Hi ,
> i've added a java project to a j2ee web project's build path.
> the java project holds hibernate classes and the j2ee project does not
> recognize the hibernate ?
> do i need to add all needed external jars twice ? that doesn't seem
> logical especialy when thinking about deployment .