Hello Rob, Chances are that there's nothing in POI that would warrant special attention when using JNI. Nonetheless it's probably best to work with a very simple (a la 'Hello World') java program while you figure out these JNI issues.
My understanding of the way Sun had written the "Invocation API" was that it allows for the potential of multiple JVMs in a single process, but that most implementations support only one. This seems like a big limitation when composing applications with many so/dll libraries, potentially written by different organisations. Any JVM-using code must either brazenly assume that nothing else uses the JVM, or plan to share it. Sharing would not be easy; the code needs to check for an already created JVM first, and probably not destroy the JVM when finished using it. Many other problems (like choice of VM initialisation parameters) are left unanswered. I just tried out calling JNI_CreateJavaVM, DestroyJavaVM, JNI_CreateJavaVM, (on JDK 1.6, Sun HotSpot, WinXP, Intel) and it doesn't work for me either. Note that the comment for DestroyJavaVM in (http://java.sun.com/j2se/1.5.0/docs/guide/jni/spec/invocation.html) says that there are limitations in the JDK which prevent DestroyJavaVM from working properly. So you might be stuck with leaving the JVM permanently loaded. This may not be such a bad thing if you application is multi-threaded and has the potential for concurrent calls to POI. Multi-threading would be harder to support assuming short-lived JVMs. cheers, Josh --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
