Hi all,
I can not solve the problem although i changed the core source code of JNA. Please advice me something, i will be mad..:)
I downloaded source of JNA 4.0.0 and VLC4J 3.0.0. I open a new Eclipse project and with -Djna.debug_load=true, I can see that JNA saw the VLC installed path if i put it to Windows System PATH environment variable.
Although it saw the path of libvlc.dll, the Native.open(filePath, openFlag) returns no handle reference for openFlag = -1.
Interestingly, handle becomes a valid reference for built-in kernel32.dll and Advapi32.dll.
Anyway. So i put the open flag option as "2" hardcoded, and this gives me a valid handle refrence.
I also changed the code in Library.java to put the options listed below :
* function-mapper
* type-mapper
But again result is negative..:(
Although LibVlcFactory class has a LibVlc instance, there is no function on its Hashmap. So, the line indicated below normally says error that "There is no method like 'libvlc_get_version()' "
String nativeVersion = instance.libvlc_get_version();
So, any ideas? My debug info is like that :
Looking in classpath from sun.misc.Launcher$AppClassLoader@58644d46 for /com/sun/jna/win32-x86-64/jnidispatch.dll
Found library resource at jar:file:/D:/JavaWorkspace/VLC4J-3.0.0-Source/lib/jna-4.0.0.jar!/com/sun/jna/win32-x86-64/jnidispatch.dll
Looking for library 'Advapi32'
Adding paths from jna.library.path: C:\Program Files (x86)\VideoLAN\VLC
Trying Advapi32.dll
Found library 'Advapi32' at Advapi32.dll
Looking for library 'kernel32'
Adding paths from jna.library.path: C:\Program Files (x86)\VideoLAN\VLC
Trying kernel32.dll
Found library 'kernel32' at kernel32.dll
Looking for library 'libvlc'
Adding paths from jna.library.path: C:\Program Files (x86)\VideoLAN\VLC
Trying C:\Program Files (x86)\VideoLAN\VLC\libvlc.dll
Found library 'libvlc' at C:\Program Files (x86)\VideoLAN\VLC\libvlc.dll
Exception in thread "main" java.lang.RuntimeException: Failed to load the native library.
The error was "Error looking up function 'libvlc_get_version': The specified module could not be found.
".
Regards,
Eray / ISTANBUL