Skip to content
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

System.mapLibraryName returns suffix 'dylib' and not 'jnilib' using JDK 7 on OS X #19

Closed
mlehman opened this issue Dec 7, 2012 · 6 comments

Comments

@mlehman
Copy link

mlehman commented Dec 7, 2012

I'm not sure what the best solution is for handling this, but for me the easiest solution was to re-package with a second copy of all the jnlib libraries using the alternate suffix.

For similar see: xerial/snappy-java#6

@mikiobraun
Copy link
Member

Hi,

so did I understood correctly, the expected name for DLLs has changed between JDK 6 and 7? dylib for JDK 7 and jnilib for JDK 6?

@mlehman
Copy link
Author

mlehman commented Dec 10, 2012

Yes, on JDK7 it looks for the native libraries with the .dylib extension which resulted in an UnsatisfiedLinkError.

Looking at other projects affected, the simplest solution seems to be just to include copies with both versions of the file extension.

@mikiobraun
Copy link
Member

Ah I see... But given that I already have all those really big shared libs in there, I think I'd rather hack something together to copy the library if that happens... .

@mikiobraun
Copy link
Member

I just committed a patch which detects when the library name ends in .dylib and uses the .jnilib ending instead. Works on my colleagues Mac with Java 7. Let me know if it works for you as well.

@mlehman
Copy link
Author

mlehman commented Dec 11, 2012

Yep! Works for me too.

@mikiobraun
Copy link
Member

alright, awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants