如何在weblogic启动时让其加载指定的jar库文件

 我来答
怎96141164388
推荐于2016-04-19 · TA获得超过123个赞
知道答主
回答量:123
采纳率:100%
帮助的人:56.2万
展开全部
项目使用了某第三方公司提供的一个jar包,且那个jar包必须在容器启动的classpath内,不能在application的classpath内。 起初是修改weblogic中domain的启动文件,想把jar的路径set进去,但是修改了startWeblogic.sh和setDomainEnv.sh都不行,比较郁闷。 后来突然想起,tomcat有个common目录,下面有个lib目录,tomcat在启动的时候会自动加载lib目录下的jar,那weblogic也应该有个类似的东东才对。 翻了翻weblogic domain的目录,发现domain下有个lib目录,里面有个说明文件这么写到: this is the domain library directory and is usually located at $DOMAIN_DIR/lib. The jars located in this directory will be picked up and added dynamically to the end of the server classpath at server startup. The jars will be ordered lexically in the classpath. The domain library directory is one mechanism that can be used for adding application libraries to the server classpath. 意思大致就是,凡是放在这个目录里的jar文件,都会在weblogic启动的时候自动追加到classpath里,可以被application引用。
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式