-
|
I use ctypes to manually launch the JVM. This is because JNIEnv* is required and JNI functions in the so file must be called directly. I have two questions. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
The hook point you would need in your external module would need to match something like this You may want to remove the if statement so that it assumes attachJVM is always embedded. I don't recall why we needed special logic here. The downsides of this is... the reason the attach to existing JVM has not been tested is no one has ever supplied use with scripts that successfully launch the JVM outside of JPype then attempt to activate it. If you are willing to contribute such scripts that I can include all the hooks you require in 1.6.
|
Beta Was this translation helpful? Give feedback.
-
|
The way to access JNIEnv from ctypes using JPype would be the following.... However if you want to mix and match JPype with ctypes one would need to add accessors in the JPype types that exposed the corresponding Java objects. It is doable, but would require a lot of care to get right. |
Beta Was this translation helpful? Give feedback.
The way to access JNIEnv from ctypes using JPype would be the following....