Yak*_*oob 4 java websphere classpath
我可以访问部署在 WebSphere 中的项目。我只创建.class文件并将它们放在WEB-INF下。
现在,我的一个 Java 类需要一个 JAR。我无权添加 JAR 并重新部署。只需要将同机C盘的JAR添加到项目的类路径中即可;这样它就可以在加载时加载 JAR。
我怎样才能做到这一点?
如果您不想在构建过程中将其放置在 WEB-INF/lib 中,可以在管理控制台中将其配置为“共享库”,然后将其与一个或多个应用程序关联。
由于这是一个 GUI,所以我不会费心去讨论细节。在管理控制台的顶层,有一个“环境”>“共享库”页面,基本上用于此专用目的。
<library id="someLibrary">
<!-- All the jar files in ther servers lib folder -->
<fileset dir="${server.config.dir}/lib" includes="*.jar" scanInterval="5s" />
</library>
<application location ="webStore.war">
<classloader commonLibraryRef="someLibrary" />
</application>
Run Code Online (Sandbox Code Playgroud)