Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attach to existing JVM documentation #1186

Open
marlow-fawn opened this issue May 7, 2024 · 1 comment
Open

Attach to existing JVM documentation #1186

marlow-fawn opened this issue May 7, 2024 · 1 comment

Comments

@marlow-fawn
Copy link

marlow-fawn commented May 7, 2024

I couldn't find any documentation for using an existing JVM - is it possible to add an example somewhere in the docs?

          It is possible with some modifications.    In android we use an existing JVM to run JPype.   It is just a matter to some patching the startJVM and the C++ to match the android path to use an existing JVM rather than spawn a fresh copy.

Originally posted by @Thrameos in #1084 (comment)

@Thrameos
Copy link
Contributor

Thrameos commented May 7, 2024

I completed that as a demo for KIVY folks. I ran all of the JPype test bench with only one failure (some issue with JNI acting differently resulting in a crash but is was a rare edge case). Unfortunately the KIVY folks never picked up the ball to test it beyond my runs in the emulator. The ANDRIOD #if/#endif shows the changes that were needed. It has been about 3 years since I last ran it myself, but if someone with wants to get it running again and document it more it is doable.

@marlow-fawn marlow-fawn changed the title It is possible with some modifications. In android we use an existing JVM to run JPype. It is just a matter to some patching the startJVM and the C++ to match the android path to use an existing JVM rather than spawn a fresh copy. Attach to existing JVM documentation May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants