Hi,

I would be keen to get help on an issue with using JNI classes from multiple
webapps. I have 2 webapps both of which need to load a class which wraps JNI
code. According to the release notes it is a good idea to place the code
which loads the library (loadLibrary()) outside the webapps dir, so I put it
in common/lib.

When the first webapp attempts to instantiate the class, the native library
is loaded apparently successfully, but the following code throws a
ClassCastException
        myImpl = (myClass)Class.forName("name of class with
JNI").newInstance();

However the confusing thing is that this works find when the class is
installed in the webapps dir (<webapps>/WEB-INF/lib)  (though the second
webapp cannot load the library of course - cannot do 2 calls to
loadLibrary).

Has anyone done this before and if so could you please share with me the
magic I need to do to make it work ?

Thanks in advance,
        James

--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to