Conversation
… passes us instead of some string that we're providing. All of the ReleaseX methods probably need similar treatment.
…l.jl into adambrewster-jni-methods
aviks
left a comment
There was a problem hiding this comment.
Looks good to me, thanks for taking this on!
| ppjvm = Array{Ptr{JavaVM}}(undef, 1) | ||
| ppenv = Array{Ptr{JNIEnv}}(undef, 1) | ||
| vm_args = JavaVMInitArgs(JNI_VERSION_1_6, convert(Cint, length(opts)), | ||
| vm_args = JavaVMInitArgs(JNI.JNI_VERSION_1_8, convert(Cint, length(opts)), |
There was a problem hiding this comment.
What's our minimum JVM version with this? Should probably document it?
There was a problem hiding this comment.
This would go along with Java 8, although as far as I can tell there really is not a difference between 1_6 and 1_8 in terms of the JNI, so maybe we should revert this.
There was a problem hiding this comment.
This is documented here: https://docs.oracle.com/javase/9/docs/specs/jni/functions.html
As you previously noted, this correspondence is missing here in the Java 8 notes:
https://docs.oracle.com/javase/8/docs/technotes/guides/jni/spec/functions.html#GetVersion
|
|
||
| include("jnienv.jl") | ||
|
|
||
| global jnifunc |
There was a problem hiding this comment.
maybe we should make these globals Refs now? JavaCall started when that feature did not exist in Julia, but maybe its worth doing now?
src/JNI.jl
Outdated
|
|
||
| # === Below Generated by make_jni2.jl === | ||
|
|
||
| #export GetVersion |
There was a problem hiding this comment.
maybe get rid of the commented exports in the generated code?
|
I am tempted to move some of the initialization code and related structs into the JNI module. We could also move some of the globals there as well and turn them in |
I updated #29 and untangled the modules.
There is now an independent JNI submodule within JavaCall that does not depend on JavaCall or any other module. JavaCall does depend on the JNI submodule.
Most of the
ccallreferences can now be made by calling a generate Julia method in the JNI module. This also exposes more JNI function calls which will help future development.The generator script has been updated, modified and documented