Java archives (JAR, ejb-jar, client-jar, etc.) contain another file called a MANIFEST.MF that is stored in the META-INF directory along with the other descriptors. For a standard JAR file, the MANIFEST describes Java elements of a JAR file. For J2EE modules, a MANIFEST plays a critical role; it is the J2EE-compliant way to specify classpath information for a J2EE module. Each utility JAR, Web module, and EJB module can specify in their MANIFEST the other JARs in the same EAR that are visible to them.
Any other JAR not listed in the MANIFEST of the WAR or the EJB-JAR is not visible to its classpath. Any reference to a class stored in a JAR within the EAR that is not listed in the MANIFEST will cause aClassNotFoundException at runtime.
Any other JAR not listed in the MANIFEST of the WAR or the EJB-JAR is not visible to its classpath. Any reference to a class stored in a JAR within the EAR that is not listed in the MANIFEST will cause a
Comments
Post a Comment