Conversation
|
Did appveyor take out Java from their images? |
|
Its my commit somehow. The master branch still passes when I rerun it. |
|
@aviks I fixed the appveyor issues. Since I moved a lot of the low level functionality into the JNI submodule, I moved the Libdl import there as well. On Windows, mscrvt100.dll also needed to be loaded and that was causing the initial appveyor issues. On further investigation into the appveyor configuration, I found that even when using the x86 platform, Julia was still trying to load the x64 JVM. By setting JAVA_HOME explicitly to the x86 JVM, and then fooling around with globals, I managed to get x86 init to work via 078278e. I don't know why that makes a difference. |
|
@aviks I intend to merge this this week. |
src/JNI.jl
Outdated
| @@ -19,6 +21,10 @@ include("jnienv.jl") | |||
| const jniref = Ref(JNINativeInterface()) | |||
| global jnifunc | |||
There was a problem hiding this comment.
I haven't looked at this holistically yet, but whey do we need both jniref and jnifunc
There was a problem hiding this comment.
I kept jnifunc around mostly for backwards compatibility in case anyone else was accessing the global.
There was a problem hiding this comment.
Ok cool. Maybe add a @deprecated_binding thing on it?
src/JNI.jl
Outdated
| jnienv = unsafe_load(penv) | ||
| global jnienv = unsafe_load(penv) | ||
| jniref[] = unsafe_load(jnienv.JNINativeInterface_) #The JNI Function table | ||
| global jnifunc = jniref[] |
There was a problem hiding this comment.
@aviks jnifunc is set here.
I also found that storing the jnienv as a global somehow makes x86 Windows work more smoothly. With that we have successful JavaCall.init() on x86 Windows. I wanted to see if I could understand why that makes a difference before I start cleaning up the globals.
|
@aviks The problem with I've left the deprecation warning, but trying to use |
|
To summarize the net changes:
As a side effect and for unknown reasons, JavaCall.init() and some functions now work on x86 Windows. This is somehow related to storing |
|
Thanks for the review, @aviks . Merging now. |
This is a follow up to creating the JNI module. Here we the JNI initialization code into JNI itself as well as the associated globals. Further those globals are now converted to type associated
Ref. Additionally the Julia interface is also simplified sincepenvno longer needs to be passed