This is sample manifest.mf file for my HelloWorldWeb module. The HelloWorldWeb.war wants to call methods inside the HelloWorldEJBClient.jar which is packaged in same .ear file as that of HelloWorldWeb.war. So in order for HelloWorldWeb.war classes to use methods in the HelloWorldEJBClient.jar it must add it in Class-path,
Manifest-Version: 1.0
Class-Path: HelloWorldEJBClient.jar
If you dont add the .jar file in the Class-path it will result in ClassNotFoundException at runtime.
Note that the MANIFEST can only list JAR files that are stored in the EAR file. Also even though a WAR file is an archive file it cannot be listed on any MANFIEST since the java artifacts within a WAR are only visible to the same WAR.
1 comment:
awful piece of information, I had come to know about your blog from my friend vimal, mumbai,i have read atleast 13 posts of yours by now, and let me tell you, your blog gives the best and the most interesting information. This is just the kind of information that i had been looking for, i'm already your rss reader now and i would regularly watch out for the new posts, once again hats off to you! Thanks a million once again, Regards, Difference Between Classpath and Path
Post a Comment