[jitsi-dev] Libjitsi Problem switching from Linux .so files to Windows .dll on OS change


#1

Problem described with pictures at:
http://stackoverflow.com/questions/30484186/why-am-i-only-able-to-load-dynamic-linking-libraries-using-djava-library-path

(Full console printout at very bottom)

For no pictures/formatting, see below:

Why am I only able to successfully load dynamic linking libraries using
"-Djava.library.path=" in Linux but not Windows?
I am using the Libjitsi library on Windows 64 and Linux 64. My source code
that uses these two OS specific version of the library libraries are
identical, the only difference is the operating system that I am using and
which version of the library (Windows-64 version or Linux-64 version) that
I am using. The library I am using provides 1 set for Windows ".dll" files
and 1 set for Linux ".so" files, each in its own folder. To load the Linux
".so" libraries, I do

"-Djava.library.path=/home/johnmichaelreed/Desktop/Dropbox/Moved_Netbeans_Projects/Crazy_Client/Libjitsi_linux_64/lib/native/linux-64"

in the VM options and everything works.

Then, when I copy and paste the directory where the Windows ".dll" native
libraries are into the VM options, I get rid of the Linux libraries path
and insert:

-Djava.library.path=C:\Users\JohnReedLOL\Desktop\Dropbox\Moved_Netbeans_Projects\Crazy_Client\Libjitsi_windows_64\lib\windows_native\windows-64

I then change the library JAR files to the ones that came with the Windows
version of the Library and I run the program and I get this error:

SEVERE: Failed to register custom Renderer
org.jitsi.impl.neomedia.jmfext.media.renderer.video.JAWTRenderer with JMF.
java.lang.UnsatisfiedLinkError:
C:\Users\JohnReedLOL\Desktop\Crazy_Client\Libjitsi_windows_64\lib\windows_native\windows-64\jnawtrenderer.dll:
Can't find dependent libraries
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1937)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1855)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1119)
at
org.jitsi.impl.neomedia.jmfext.media.renderer.video.JAWTRenderer.<clinit>(JAWTRenderer.java:90)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:260)
at
org.jitsi.impl.neomedia.device.DeviceConfiguration.registerCustomRenderers(DeviceConfiguration.java:1034)
at
org.jitsi.impl.neomedia.device.DeviceConfiguration.<init>(DeviceConfiguration.java:355)
at
org.jitsi.impl.neomedia.MediaServiceImpl.<init>(MediaServiceImpl.java:150)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
at java.lang.Class.newInstance(Class.java:438)
at org.jitsi.impl.libjitsi.LibJitsiImpl.getService(LibJitsiImpl.java:142)
at
org.jitsi.service.libjitsi.LibJitsi.invokeGetServiceOnImpl(LibJitsi.java:163)
at org.jitsi.service.libjitsi.LibJitsi.getMediaService(LibJitsi.java:115)
at outermost_crazy.Libjitsi_Main.<init>(Libjitsi_Main.java:124)
at outermost_crazy.Libjitsi_Main.main(Libjitsi_Main.java:827)

The weird thing is I am 100% sure that the native library path is the right
place because when I print it using
System.getProperty("java.library.path"), I get the folder:

C:\Users\JohnReedLOL\Desktop\Dropbox\Moved_Netbeans_Projects\Crazy_Client\Libjitsi_windows_64\lib\windows_native\windows-64

^ This folder definitely has all 12 .dll files ^. The library JAR files
that I am using are the ones the ones that came with these 12 ".dll" files,
not the ones that came with the Linux ".so" files, so I am pretty sure that
I am using the right JAR files. I am also sure that both the Windows JVM
and the Linux JVM are 64 bit because the system property says so. So why is
this error only happening on Windows with the .dll files, but not on Linux
with the .so files (full console printout provided at bottom)?

Dependency Walker opening of jnawtrenderer.dll:
![Dependency Walker Screenshot][1]

  [1]: http://i.stack.imgur.com/CDIf3.png

May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO: Failed to initialize LibJitsi backend
org.jitsi.impl.libjitsi.LibJitsiOSGiImpl. (Exception stack trace follows.)
Will try an alternative.
java.lang.IllegalStateException: FrameworkUtil.getBundle
at org.jitsi.impl.libjitsi.LibJitsiOSGiImpl.<init>(LibJitsiOSGiImpl.java:37)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
at java.lang.Class.newInstance(Class.java:438)
at org.jitsi.service.libjitsi.LibJitsi.start(LibJitsi.java:238)
at org.jitsi.service.libjitsi.LibJitsi.start(LibJitsi.java:171)
at outermost_crazy.Libjitsi_Main.main(Libjitsi_Main.java:809)

May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO: Successfully started LibJitsi using as implementation:
org.jitsi.impl.libjitsi.LibJitsiImpl
May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO: java.runtime.name=Java(TM) SE Runtime Environment
May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO: sun.boot.library.path=C:\Program Files\Java\jdk1.8.0_31\jre\bin
May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO: java.vm.version=25.31-b07
May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO: java.vm.vendor=Oracle Corporation
May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO: java.vendor.url=http://java.oracle.com/
May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO: path.separator=;
May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO: java.vm.name=Java HotSpot(TM) 64-Bit Server VM
May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO: file.encoding.pkg=sun.io
May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO: user.country=US
May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO: user.script=
May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO: sun.java.launcher=SUN_STANDARD
May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO: sun.os.patch.level=Service Pack 1
May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO: java.vm.specification.name=Java Virtual Machine Specification
May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO: user.dir=C:\Users\JohnReedLOL\Desktop\Crazy_Client
May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO: java.runtime.version=1.8.0_31-b13
May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO: java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment
May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO: java.endorsed.dirs=C:\Program Files\Java\jdk1.8.0_31\jre\lib\endorsed
May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO: os.arch=amd64
May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO: java.io.tmpdir=C:\Users\JOHNRE~1\AppData\Local\Temp\
May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO: line.separator=

May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO: net.sf.fmj.utility.JmfRegistry.disableLoad=true
May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO: java.vm.specification.vendor=Oracle Corporation
May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO: user.variant=
May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO: os.name=Windows 7
May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO: sun.jnu.encoding=Cp1252
May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO: java.net.preferIPv6Addresses=false
May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO:
java.library.path=c:\Users\JohnReedLOL\Desktop\Crazy_Client\Libjitsi_windows_64\lib\windows_native\windows-64
May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO: sun.awt.enableExtraMouseButtons=true
May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO: java.specification.name=Java Platform API Specification
May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO: java.class.version=52.0
May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO: java.net.preferIPv4Stack=true
May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO:
org.jitsi.service.audionotifier.AudioNotifierService=org.jitsi.impl.neomedia.notify.AudioNotifierServiceImpl
May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO: sun.management.compiler=HotSpot 64-Bit Tiered Compilers
May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO: os.version=6.1
May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO: user.home=C:\Users\JohnReedLOL
May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO: user.timezone=America/New_York
May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO: java.awt.printerjob=sun.awt.windows.WPrinterJob
May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO: file.encoding=UTF-8
May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO: java.specification.version=1.8
May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO:
java.class.path=C:\Users\JohnReedLOL\Desktop\Crazy_Client\Libjitsi_windows_64\libjitsi.jar;C:\Users\JohnReedLOL\Desktop\Crazy_Client\Libjitsi_windows_64\lib\bccontrib-1.0-SNAPSHOT.jar;C:\Users\JohnReedLOL\Desktop\Crazy_Client\Libjitsi_windows_64\lib\bcpkix-jdk15on-151.jar;C:\Users\JohnReedLOL\Desktop\Crazy_Client\Libjitsi_windows_64\lib\bcprov-jdk15on-151.jar;C:\Users\JohnReedLOL\Desktop\Crazy_Client\Libjitsi_windows_64\lib\fmj.jar;C:\Users\JohnReedLOL\Desktop\Crazy_Client\Libjitsi_windows_64\lib\ice4j.jar;C:\Users\JohnReedLOL\Desktop\Crazy_Client\Libjitsi_windows_64\lib\jain-sdp.jar;C:\Users\JohnReedLOL\Desktop\Crazy_Client\Libjitsi_windows_64\lib\jna.jar;C:\Users\JohnReedLOL\Desktop\Crazy_Client\Libjitsi_windows_64\lib\json-simple-1.1.1.jar;C:\Users\JohnReedLOL\Desktop\Crazy_Client\Libjitsi_windows_64\lib\jspeex.jar;C:\Users\JohnReedLOL\Desktop\Crazy_Client\Libjitsi_windows_64\lib\osgi.core.jar;C:\Users\JohnReedLOL\Desktop\Crazy_Client\Libjitsi_windows_64\lib\sdes4j.jar;C:\Users\JohnReedLOL\Desktop\Crazy_Client\Libjitsi_windows_64\lib\zrtp4j-light.jar;C:\Users\JohnReedLOL\Desktop\Crazy_Client\build\classes
May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO: user.name=JohnReedLOL
May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO: java.vm.specification.version=1.8
May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO: sun.java.command=outermost_crazy.Libjitsi_Main
May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO: java.home=C:\Program Files\Java\jdk1.8.0_31\jre
May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO: sun.arch.data.model=64
May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO: user.language=en
May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO: java.specification.vendor=Oracle Corporation
May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO: net.sf.fmj.utility.JmfRegistry.disableCommit=true
May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO: awt.toolkit=sun.awt.windows.WToolkit
May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO: java.vm.info=mixed mode
May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO: java.version=1.8.0_31
May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO: java.ext.dirs=C:\Program
Files\Java\jdk1.8.0_31\jre\lib\ext;C:\Windows\Sun\Java\lib\ext
May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO: sun.boot.class.path=C:\Program
Files\Java\jdk1.8.0_31\jre\lib\resources.jar;C:\Program
Files\Java\jdk1.8.0_31\jre\lib\rt.jar;C:\Program
Files\Java\jdk1.8.0_31\jre\lib\sunrsasign.jar;C:\Program
Files\Java\jdk1.8.0_31\jre\lib\jsse.jar;C:\Program
Files\Java\jdk1.8.0_31\jre\lib\jce.jar;C:\Program
Files\Java\jdk1.8.0_31\jre\lib\charsets.jar;C:\Program
Files\Java\jdk1.8.0_31\jre\lib\jfr.jar;C:\Program
Files\Java\jdk1.8.0_31\jre\classes
May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO: java.vendor=Oracle Corporation
May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO: file.separator=\
May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO: java.vendor.url.bug=http://bugreport.sun.com/bugreport/
May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO: sun.io.unicode.encoding=UnicodeLittle
May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO: sun.cpu.endian=little
May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO: sun.desktop=windows
May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO: sun.cpu.isalist=amd64
May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO: Normal classloader
May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO: failed to find jitsi-defaults.properties with class loader, will
continue without it.
May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO: Normal classloader
May 27, 2015 10:46:30 AM org.jitsi.util.Logger info
INFO: failed to find jitsi-default-overrides.properties with class loader,
will continue without it.
May 27, 2015 10:46:31 AM org.jitsi.util.Logger info
INFO: Initializing audio devices
Hotplug cache populated with:
'\\?\hdaudio#func_01&ven_111d&dev_7605&subsys_103c140a&rev_1004#4&30ddfa8b&0&0001#{6994ad04-93ef-11d0-a3cc-00a0c9223196}\micinwave'
Hotplug cache populated with:
'\\?\hdaudio#func_01&ven_111d&dev_7605&subsys_103c140a&rev_1004#4&30ddfa8b&0&0001#{6994ad04-93ef-11d0-a3cc-00a0c9223196}\muxedin1wave'
Hotplug cache populated with:
'\\?\hdaudio#func_01&ven_111d&dev_7605&subsys_103c140a&rev_1004#4&30ddfa8b&0&0001#{6994ad04-93ef-11d0-a3cc-00a0c9223196}\spdifoutwave'
Hotplug cache populated with:
'\\?\hdaudio#func_01&ven_111d&dev_7605&subsys_103c140a&rev_1004#4&30ddfa8b&0&0001#{6994ad04-93ef-11d0-a3cc-00a0c9223196}\speakerwave'
before paHostApiInitializers[0].
after paHostApiInitializers[0].
May 27, 2015 10:46:31 AM org.jitsi.util.Logger info
INFO: Initializing video devices
May 27, 2015 10:46:31 AM org.jitsi.util.Logger info
INFO: Looking for configured audio devices.
May 27, 2015 10:46:31 AM org.jitsi.util.Logger info
INFO: Scanning for configured Video Devices.
May 27, 2015 10:46:31 AM org.jitsi.util.Logger info
INFO: Found Desktop Streaming 0 as a AVFRAME, class
org.jitsi.impl.neomedia.codec.video.AVFrame video capture device.
May 27, 2015 10:46:31 AM org.jitsi.util.Logger error
SEVERE: Failed to register custom Renderer
org.jitsi.impl.neomedia.jmfext.media.renderer.video.JAWTRenderer with JMF.
java.lang.UnsatisfiedLinkError:
C:\Users\JohnReedLOL\Desktop\Crazy_Client\Libjitsi_windows_64\lib\windows_native\windows-64\jnawtrenderer.dll:
Can't find dependent libraries
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1937)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1855)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1119)
at
org.jitsi.impl.neomedia.jmfext.media.renderer.video.JAWTRenderer.<clinit>(JAWTRenderer.java:90)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:260)
at
org.jitsi.impl.neomedia.device.DeviceConfiguration.registerCustomRenderers(DeviceConfiguration.java:1034)
at
org.jitsi.impl.neomedia.device.DeviceConfiguration.<init>(DeviceConfiguration.java:355)
at
org.jitsi.impl.neomedia.MediaServiceImpl.<init>(MediaServiceImpl.java:150)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
at java.lang.Class.newInstance(Class.java:438)
at org.jitsi.impl.libjitsi.LibJitsiImpl.getService(LibJitsiImpl.java:142)
at
org.jitsi.service.libjitsi.LibJitsi.invokeGetServiceOnImpl(LibJitsi.java:163)
at org.jitsi.service.libjitsi.LibJitsi.getMediaService(LibJitsi.java:115)
at outermost_crazy.Libjitsi_Main.<init>(Libjitsi_Main.java:124)
at outermost_crazy.Libjitsi_Main.main(Libjitsi_Main.java:827)


#2

I've seen it happen on Linux as well and I don't know what's causing
it yet. For whatever reason, the jawt library isn't found. Could you
please locate jawt.dll in your Java Runtime Environment and adding it
to the PATH before starting Jitsi?

···

2015-05-27 18:05 GMT+03:00 John Michael Lafayette <johnmichaelreedfas@gmail.com>:

SEVERE: Failed to register custom Renderer
org.jitsi.impl.neomedia.jmfext.media.renderer.video.JAWTRenderer with JMF.
java.lang.UnsatisfiedLinkError:
C:\Users\JohnReedLOL\Desktop\Crazy_Client\Libjitsi_windows_64\lib\windows_native\windows-64\jnawtrenderer.dll:
Can't find dependent libraries