如何在weblogic启动时让其加载指定的jar库文件
2009-08-30 03:53
811 查看
项目使用了某第三方公司提供的一个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.
It is possible to override the $DOMAIN_DIR/lib directory using the -Dweblogic.ext.dirs system property during startup. This property specifies a list of directories to pick up jars from and dynamically append to the end of the server classpath using java.io.File.pathSeparator as the delimiter between path entries.
意思大致就是,凡是放在这个目录里的jar文件,都会在weblogic启动的时候自动追加到classpath里,可以被application引用。
问题圆满解决,不过解决之前花了好久修改启动文件 囧rz......
起初是修改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.
It is possible to override the $DOMAIN_DIR/lib directory using the -Dweblogic.ext.dirs system property during startup. This property specifies a list of directories to pick up jars from and dynamically append to the end of the server classpath using java.io.File.pathSeparator as the delimiter between path entries.
意思大致就是,凡是放在这个目录里的jar文件,都会在weblogic启动的时候自动追加到classpath里,可以被application引用。
问题圆满解决,不过解决之前花了好久修改启动文件 囧rz......
相关文章推荐
- 如何在weblogic启动时让其加载指定的jar库文件
- 如何在weblogic启动时让其加载指定的jar库文件
- 如何在weblogic启动时让其加载指定的jar库文件
- (tomcat中级)应用Tomcat的WebappClassLoader加载指定目录的jar文件
- SpringBoot启动时是如何加载配置文件application.yml文件
- 如何自动根据文件扩展名来启动相应的应用程序加载文件?
- android jar 如何加载布局文件
- springboot 修改启动时默认加载application.properties文件以及加载指定配置文件
- 启动遍历文件夹中的所有指定的文件 ( 执行exe文件 或者加载dll )
- Weblogic.xml 文件配置 优先加载本地jar包及 jsp热部署
- (tomcat中级)应用Tomcat的WebappClassLoader加载指定目录的jar文件
- [转] 如何双击jar文件启动java应用程序
- 如何在eclipse的配置文件里指定jdk路径(即配置启动eclipse的JDK)
- 如何在linux正常启动的系统中(挂载rootfs)某个目录下来加载ubi文件类型的recoveryfs?
- activemq启动加载指定配置文件
- 如何双击jar文件启动java应用程序
- 编译运行eclispe下的项目,weblogic启动报错:系统找不到指定文件
- java中如何从远程主机(服务器)或本地加载jar文件
- 如何在项目启动时,加载或解析某配置文件
- centos中指定apache启动时加载实用的配置文件http.conf