JNI in WebSphere
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Aniket_Bharambe
Posted On:   Tuesday, January 20, 2004 11:24 PM

Hi, I have deployed a Java Web Service on WebSphere Application Server v5.0. Along with the web service classes, deployed is an associate Java class who needs to communicate with C++ using JNI. I have created the Library in WebSphere v5.0, and also added its reference at application level and application server level. The following piece of code is written to load the library: static { System.out.println(" Just Before loading library "); System.loadLibrary( ); System.out.println(" Just After loading library "); } When the WebService is called, the program flow stops at   More>>

Hi,


I have deployed a Java Web Service on WebSphere Application Server v5.0. Along with the web service classes, deployed is an associate Java class who needs to communicate with C++ using JNI.


I have created the Library in WebSphere v5.0, and also added its reference at application level and application server level.


The following piece of code is written to load the library:


static

{

System.out.println(" Just Before loading library ");

System.loadLibrary( );

System.out.println(" Just After loading library ");

}


When the WebService is called, the program flow stops at "Just Before loading library".



I am able to call the JNI code, if I do it from outside the WebSphere container.



Please can anyone help me on this.



Thanks and Regards,

Aniket.    <<Less

Re: JNI in WebSphere

Posted By:   Christopher_Koenigsberg  
Posted On:   Wednesday, January 21, 2004 10:05 AM

Presumably (?) the library file (.so for Unix, .dll for Windows) has to be found by the JVM used by Websphere, in the environment of the userid it is running as; e.g. (for Unix) has to be in a directory found on the LD_LIBRARY_PATH, or (for Windows) the PATH.

About | Sitemap | Contact