• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to load a .so file when the weblogic server starts up

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Hi All,

I want to load a sapjco3.so file when the weblogic 11g  server starts up, so i have added below code in file startWebLogic.sh.


export CLASSPATH=$CLASSPATH:/opt/sasuapps/nancy/patches/wlw/wlw-system.jar:/home/nancy/prsSapFileDoNotDelete/libsapjco3.so


I know that i can load the jar files to the weblogic class path using above code but have doubt whether it will work for any .so file or not.

Please suggest me if i any configuration available to load the libsapjco3.so file during server startup.

Regards
Sanjeev



 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can't load shared Unix libraries using the Java classpath.  You should probably be doing this at the operating system level.  Googling for your library, it appears that you are attempting to use the SAP Suite Adapter for JCo.  There are installation instructions here.  
I am very reluctant to add JAR files to Weblogic's classpath as it may have unintended consequences with Weblogic's dependencies, so the SAP JAR file should probably be in your WAR/EAR unless you are using Weblogic's data sources to manage/pool connections.
 
Sheriff
Posts: 22781
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As far as I know, system libraries (.dll files on Windows, .so on Linux) should be part of the library path (system property java.library.path), not the class path.

An alternative is to use System.load (not loadLibrary), which takes an absolute file name. This is not portable though, and must be done somewhere in code.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic