-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Problem loading libraries with long paths #243
Comments
Do you have unicode characters in the path? That could cause the load to fail; only the ANSI version of LoadLibrary has a small path length limit, and JNA uses the unicode version (LoadLibraryExW, actually). On Jun 13, 2013, at 5:06 PM, Max Bureck wrote:
|
Hi, the path does not contain unicode characters. And all the characters used in the long path work in shorter paths. As soon as I have a proper internet connection I will download the JNA sources, build the jnidispatch.dll on my machine, and replace the delivered DLL with mine for testing purposes. But somehow I have the feeling that this won't make a difference. |
Hi, I suppose, this change causes issues, that I'm currently experiencing. I'm trying to use libvlc 2.1.3 in java project within 64 bit JVM on windows 7. With jna-3.5.2 everyting works fine, but with jna-4.0.0 libvlc can not find its plugin modules. Here's a snippet from the log:
Here is the log with jna-3.5.2 for comparison:
Not sure if this a right place to post this, but please take a look. Currently it blocks me from using newest version of jna. Thank you! |
Maybe it’s libvlc that can’t handle the long path format? On Feb 11, 2014, at 11:02 AM, Alexey Vakhrenev [email protected] wrote:
|
Hi,
I am working on a Windows 7 (64 bit) but on a 32 bit JVM and I am using JNA 3.5.2.
I have to load DLLs by their absolute path, but if I try to load them and the path has a long path (my assumption is 256 characters) loading the library fails with an UnsatisfiedLinkError.
If I understand the JNA code correctly, the absolute path to the DLL will always be computed when loading the the library, so long paths are always a problem.
Is this an inherent restriction of the operating system or is there any way around this?
Thanks,
Max
The text was updated successfully, but these errors were encountered: