bcdev / jpy

A bi-directional Python-Java bridge used to embed Java in CPython or the other way round.
Apache License 2.0
187 stars 37 forks source link

added static build and ability to get an existing jvm pointer #152

Open udnaan opened 5 years ago

udnaan commented 5 years ago

This makes it easy to embed jpy in an existing java/jni project.

Chiefly, the two changes are the building of a static library and JPy_get_jvm function which would use the JNI call to retrieve the existing JVM pointer.

ShaheedHaque commented 5 years ago

@forman: Also, would having this merged open the door to being able to delete and reload the JVM?

@udnaan: Do you propose to make the change requested by @forman?

udnaan commented 5 years ago

I'm okay with it as it seems an isolated enough change. I just can't guarantee that it works as I haven't tested it nor will have time for a few weeks to do so.