如何在ejb-jar中包含外部jar [英] How to include external jar in ejb-jar

查看:126
本文介绍了如何在ejb-jar中包含外部jar的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在我的ejb3 jar文件中包含外部jar文件?有一个外部jar项目与所有帮助类和manifest.mf文件。现在我在eclipse中的classpath中有这个jar。但是当eclipse构建ejb-jar时,我希望它将这个外部jar文件包含在应用程序服务器中,当我的ejb加载并运行它可以在外部jar中使用类。现在我在Manifest.mf中为ejb-jar添加引用,但是当eclipse构建ejb-jar时,它不会打包这个外部jar,在运行时我得到ClassNotFoundException。有没有人能给我一个例子,如何实现这一点?

How can I include external jar file in my ejb3 jar file? There is one external jar project with all helper classes and manifest.mf file. Now I have this jar in my classpath in eclipse. But when eclipse build the ejb-jar I want it to include this external jar file so in Application server when my ejb loads and run it can use classes in external jar. Right now I am adding a reference in Manifest.mf for ejb-jar, still when eclipse build the ejb-jar it is not packaging this external jar and during runtime I am getting ClassNotFoundException.

我正在使用Eclipse 3.6和EJB3

Can somebody please give me an example how to achieve this? I am using Eclipse 3.6 and EJB3

推荐答案

你必须创建耳机或战争部署,并包括你的ejb.jar和第三方party.jar进入它。然后将其部署到jboss

You have to create ear or war deployment and include your ejb.jar and a third-party.jar into it. Then deploy it to jboss

这篇关于如何在ejb-jar中包含外部jar的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆