| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Did appveyor take out Java from their images? |
Sorry, something went wrong.
|
Its my commit somehow. The master branch still passes when I rerun it. |
Sorry, something went wrong.
|
@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. |
Sorry, something went wrong.
|
@aviks I intend to merge this this week. |
Sorry, something went wrong.
| @@ -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
Sorry, something went wrong.
There was a problem hiding this comment.
I kept jnifunc around mostly for backwards compatibility in case anyone else was accessing the global.
Sorry, something went wrong.
There was a problem hiding this comment.
Ok cool. Maybe add a @deprecated_binding thing on it?
Sorry, something went wrong.
| 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.
Sorry, something went wrong.
|
@aviks The problem with Base.@deprecated_binding is that it declares a const at compile time for jnifunc which will be invalid. We could try to update it at runtime, but then this issues a warning about redefining a const. I've left the deprecation warning, but trying to use jnifunc will fail now. |
Sorry, something went wrong.
|
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 jnienv as a global. |
Sorry, something went wrong.
|
Thanks for the review, @aviks . Merging now. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
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 since penv no longer needs to be passed