-
Notifications
You must be signed in to change notification settings - Fork 151
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
Java expects libjep.dylib
rather than jep.so
on OS X
#98
Comments
We already do a link of jep.so to libjep.jnilib. Did you not get that link? It's part of the |
I did. The loading didn't work until I made a link to libjep.dylib. |
Although System.mapLibraryName will return Your environment seems very close to the travis-ci configuration that we use to test OS X, it is weird that you are getting different results. Can you run the jep tests( Another theory is that you may be using a custom class loader that implements the findLibrary method and only works with the default name. Can you see what ClassLoader is being used for the System.loadLibrary call. It is normally the ClassLoader of the calling class but I don't know what that would be at the scala interpreter. Although the simple fix is to just add a link from |
This page from Apple says, "JNI libraries are named with the library name used in the System.loadLibrary() method of your Java code, prefixed by lib and suffixed with .jnilib. For example, System.loadLibrary("hello") loads the library named libhello.jnilib. Java HotSpot also recognizes .dylib as a valid JNI library format as of OS X v10.5." I found a few random pages that claimed that JDK 7 needs .dylib:
I know .jnilib works on my machine at home that's on El Capitan with Oracle Java 8. |
We need to revisit this now that we've dropped support for versions of Java before 1.7 and Oracle is providing the JRE instead of Apple. That said, a number of Jep users are probably switching to OpenJDK. We may want to wait until we drop support for 1.7 too. I don't have a reasonable way to test these different environments. |
Jep 4.0 will drop support for JDK 7, so if we are going to change the link from .jnilib to .dylib, it should go in Jep 4. |
Jep 4.0 has now been released, but I haven't made any changes for this. I'm not sure if this is still an issue or not. |
What I did:
Why? Because:
What solved the issue for me:
OS X Sierra
Pre-installed python 2.7
Oracle Java
"java version "1.8.0_152"
Java(TM) SE Runtime Environment (build 1.8.0_152-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.152-b16, mixed mode)"
The text was updated successfully, but these errors were encountered: