I have a web server which host 3 different applications, they all need one same library called "bridge2java.jar
". I decided to use shared library to avoid ".dll (bridge2java.dll) already load in another process error开发者_运维技巧". I followed steps to create a shared library called bridge2java
and give it a correct path to the jar file. And added this shared library to Server level, so I don't have to add to each applications.
I restarted the server, it is fine, no error in the console. However in my IDE (RAD), it highlight the import com.ibm.bridg2java.OleEnvironment
to red says the import cannot be resolved.
Note: I can see the path to .jar file is in the Class Loader Viewer in admin console, however, if I click "classes" then it doesn't list down any classed need to be load in jar file.
Any suggestion? Spend whole day to Google around/tried various ways, still cannot find a answer work for me.
Thanks.
I am assuming you have an EAR project that contains all of you 3 applications? If so, double click on the application.xml
in the EAR project under META-INF
, then go to the Deployment
tab to add the shared library.
Then in your web projects add a reference to the jar files to the build path. Don't include the jar file into the deployment assembly so that it will not get exported to .war file.
The best way to keep the equivalent of shared libraries in the IDE is to use the USER_LIBRARIES.
Create USER_LIBRARY and reference them in the class path for each of the projects that needs them.
As mentioned by the others, runtime (WAS) is different from the development (RAD).
HTH
Manglu
精彩评论