This repository was archived by the owner on Aug 5, 2021. It is now read-only.
added static build and ability to get an existing jvm pointer#152
Open
udnaan wants to merge 1 commit intobcdev:masterfrom
Opus-AI:master
Open
added static build and ability to get an existing jvm pointer#152udnaan wants to merge 1 commit intobcdev:masterfrom Opus-AI:master
udnaan wants to merge 1 commit intobcdev:masterfrom
Opus-AI:master
Conversation
forman
reviewed
Dec 11, 2018
| JNI_GetCreatedJavaVMs(NULL, 0, &nVMs); // 1. just get the required array length | ||
| jvms = (JavaVM**)malloc(sizeof(JavaVM*) * nVMs); | ||
| JNI_GetCreatedJavaVMs(jvms, nVMs, &nVMs); // 2. get the data | ||
| printf("jvm status: %p:%u\nstarting python\n", *jvms, nVMs); |
Member
There was a problem hiding this comment.
Only print, if global diagnosis flag is set.
Author
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_jvmfunction which would use the JNI call to retrieve the existing JVM pointer.