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

Qt5 UnsatisfiedLinkError #862

Closed
kholme2 opened this issue Apr 1, 2020 · 7 comments
Closed

Qt5 UnsatisfiedLinkError #862

kholme2 opened this issue Apr 1, 2020 · 7 comments

Comments

@kholme2
Copy link

kholme2 commented Apr 1, 2020

I'm trying to run the GettingStarted Qt sample (https://github.com/bytedeco/javacpp-presets/tree/master/qt) on Windows using version 1.5.2.

I'm able to build with maven but get the following error when running:

Exception` in thread "main" java.lang.UnsatisfiedLinkError: no jniQt5Core in java.library.path: [C:\Users\kholme\Downloads\openjdk-14_windows-x64_bin\jdk-14\bin, C:\WINDOWS\Sun\Java\bin, C:\WINDOWS\system32, C:\WINDOWS, D:\Program Files (x86)\Git\bin, D:\Program Files\nodejs, D:\Program Files\Microsoft HPC Pack 2012\Bin, C:\ProgramData\Oracle\Java\javapath, C:\Program Files\Common Files\Microsoft Shared\Microsoft Online Services, C:\Program Files (x86)\Common Files\Microsoft Shared\Microsoft Online Services, C:\WINDOWS\system32, C:\WINDOWS, C:\WINDOWS\System32\Wbem, C:\WINDOWS\System32\WindowsPowerShell\v1.0, C:\Program Files\Intel\WiFi\bin, C:\Program Files\Common Files\Intel\WirelessCommon, C:\Program Files\Microsoft\Web Platform Installer, C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0, C:\Program Files\Microsoft SQL Server\110\Tools\Binn, C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn, C:\Program Files\Microsoft SQL Server\100\Tools\Binn, C:\Program Files\Microsoft SQL Server\100\DTS\Binn, C:\Program Files (x86)\WinMerge, C:\Program Files\Microsoft Windows Performance Toolkit, D:\arcanist\arcanist\bin, C:\Users\kholme\Desktop\ArcanistSetup\php-5.6.6-nts-Win32-VC11-x64, C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE, C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn, C:\Program Files (x86)\WinSCP, D:\Anaconda, D:\Anaconda\Scripts, D:\Program Files (x86)\Git\bin, D:\arcanist\arcanist\src\lint\linter, D:\Anaconda\Lib\site-packages\robot, C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE, C:\Program Files (x86)\Windows Live\Shared, C:\Program Files\Windows Imaging, C:\WINDOWS\System32\OpenSSH, C:\Program Files\dotnet, C:\jython2.7.1\bin, C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common, C:\WINDOWS\system32, C:\WINDOWS, C:\WINDOWS\System32\Wbem, C:\WINDOWS\System32\WindowsPowerShell\v1.0, C:\WINDOWS\System32\OpenSSH, C:\Program Files\PuTTY, C:\Program Files\Docker\Docker\resources\bin, C:\ProgramData\DockerDesktop\version-bin, C:\Users\kholme\Downloads\apache-maven-3.6.3-bin\apache-maven-3.6.3\bin, C:\ThirdWaveSystems\AdvantEdge\advanttec\bin, C:\ThirdWaveSystems\AdvantEdge\advantpre\Lib\DLL, C:\ThirdWaveSystems\AdvantEdge\advantpre\Lib\jar, C:\ProgramData\Oracle\Java\javapath, C:\Program Files\Common Files\Microsoft Shared\Microsoft Online Services, C:\Program Files (x86)\Common Files\Microsoft Shared\Microsoft Online Services, C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common, C:\Windows\system32, C:\Windows, C:\Windows\System32\Wbem, C:\Windows\System32\WindowsPowerShell\v1.0, C:\Program Files\Intel\WiFi\bin, C:\Program Files\Common Files\Intel\WirelessCommon, C:\Program Files\Microsoft\Web Platform Installer, C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0, C:\Program Files (x86)\Windows Kits\8.0\Windows Performance Toolkit, C:\Program Files\Microsoft SQL Server\110\Tools\Binn, C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn, C:\Program Files\Microsoft SQL Server\100\Tools\Binn, C:\Program Files\Microsoft SQL Server\100\DTS\Binn, C:\Program Files (x86)\WinMerge, D:\Program Files\TortoiseSVN\bin, D:\Perl\bin, C:\Program Files\Microsoft Windows Performance Toolkit, D:\Program Files (x86)\Git, C:\Users\kholme\AppData\Local\Microsoft\WindowsApps, ., D:\Users\kholme\AppData\Local\Programs\Fiddler, C:\Users\kholme\AppData\Roaming\npm, .]

at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2680)
at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:807)
at java.base/java.lang.System.loadLibrary(System.java:1907)
at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:1543)
at org.bytedeco.javacpp.Loader.load(Loader.java:1192)
at org.bytedeco.javacpp.Loader.load(Loader.java:1058)
at org.bytedeco.qt.helper.Qt5Core.(Qt5Core.java:40)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:427)
at org.bytedeco.javacpp.Loader.load(Loader.java:1109)
at org.bytedeco.javacpp.Loader.load(Loader.java:1058)
at GettingStarted.main(GettingStarted.java:25)
Caused by: java.lang.UnsatisfiedLinkError: no Qt5Core in java.library.path: [C:\Users\kholme\Downloads\openjdk-14_windows-x64_bin\jdk-14\bin, C:\WINDOWS\Sun\Java\bin, C:\WINDOWS\system32, C:\WINDOWS, D:\Program Files (x86)\Git\bin, D:\Program Files\nodejs, D:\Program Files\Microsoft HPC Pack 2012\Bin, C:\ProgramData\Oracle\Java\javapath, C:\Program Files\Common Files\Microsoft Shared\Microsoft Online Services, C:\Program Files (x86)\Common Files\Microsoft Shared\Microsoft Online Services, C:\WINDOWS\system32, C:\WINDOWS, C:\WINDOWS\System32\Wbem, C:\WINDOWS\System32\WindowsPowerShell\v1.0, C:\Program Files\Intel\WiFi\bin, C:\Program Files\Common Files\Intel\WirelessCommon, C:\Program Files\Microsoft\Web Platform Installer, C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0, C:\Program Files\Microsoft SQL Server\110\Tools\Binn, C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn, C:\Program Files\Microsoft SQL Server\100\Tools\Binn, C:\Program Files\Microsoft SQL Server\100\DTS\Binn, C:\Program Files (x86)\WinMerge, C:\Program Files\Microsoft Windows Performance Toolkit, D:\arcanist\arcanist\bin, C:\Users\kholme\Desktop\ArcanistSetup\php-5.6.6-nts-Win32-VC11-x64, C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE, C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn, C:\Program Files (x86)\WinSCP, D:\Anaconda, D:\Anaconda\Scripts, D:\Program Files (x86)\Git\bin, D:\arcanist\arcanist\src\lint\linter, D:\Anaconda\Lib\site-packages\robot, C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE, C:\Program Files (x86)\Windows Live\Shared, C:\Program Files\Windows Imaging, C:\WINDOWS\System32\OpenSSH, C:\Program Files\dotnet, C:\jython2.7.1\bin, C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common, C:\WINDOWS\system32, C:\WINDOWS, C:\WINDOWS\System32\Wbem, C:\WINDOWS\System32\WindowsPowerShell\v1.0, C:\WINDOWS\System32\OpenSSH, C:\Program Files\PuTTY, C:\Program Files\Docker\Docker\resources\bin, C:\ProgramData\DockerDesktop\version-bin, C:\Users\kholme\Downloads\apache-maven-3.6.3-bin\apache-maven-3.6.3\bin, C:\ThirdWaveSystems\AdvantEdge\advanttec\bin, C:\ThirdWaveSystems\AdvantEdge\advantpre\Lib\DLL, C:\ThirdWaveSystems\AdvantEdge\advantpre\Lib\jar, C:\ProgramData\Oracle\Java\javapath, C:\Program Files\Common Files\Microsoft Shared\Microsoft Online Services, C:\Program Files (x86)\Common Files\Microsoft Shared\Microsoft Online Services, C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common, C:\Windows\system32, C:\Windows, C:\Windows\System32\Wbem, C:\Windows\System32\WindowsPowerShell\v1.0, C:\Program Files\Intel\WiFi\bin, C:\Program Files\Common Files\Intel\WirelessCommon, C:\Program Files\Microsoft\Web Platform Installer, C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0, C:\Program Files (x86)\Windows Kits\8.0\Windows Performance Toolkit, C:\Program Files\Microsoft SQL Server\110\Tools\Binn, C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn, C:\Program Files\Microsoft SQL Server\100\Tools\Binn, C:\Program Files\Microsoft SQL Server\100\DTS\Binn, C:\Program Files (x86)\WinMerge, D:\Program Files\TortoiseSVN\bin, D:\Perl\bin, C:\Program Files\Microsoft Windows Performance Toolkit, D:\Program Files (x86)\Git, C:\Users\kholme\AppData\Local\Microsoft\WindowsApps, ., D:\Users\kholme\AppData\Local\Programs\Fiddler, C:\Users\kholme\AppData\Roaming\npm, .]
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2680)
at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:807)
at java.base/java.lang.System.loadLibrary(System.java:1907)
at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:1543)
at org.bytedeco.javacpp.Loader.load(Loader.java:1143)
... 7 more

I also get a NullPointerException when trying to use the Dependency tool as described in the wiki, https://github.com/bytedeco/javacpp-presets/wiki/Debugging-UnsatisfiedLinkError-on-Windows.

Have I done something wrong with my configuration? Is the javacpp qt supported for Windows?

@saudet
Copy link
Member

saudet commented Apr 2, 2020

No, there's no builds for Windows yet, but contributions are welcome!

@saudet
Copy link
Member

saudet commented Apr 2, 2020

/cc @freastro

@freastro
Copy link
Contributor

freastro commented Apr 2, 2020

I'm no longer using the project and I don't remember if I had it working on Windows or only on macOS. The issue appears to be that Qt5Core isn't in your path. Please ensure that you have Qt5 installed and that the dlls are added to your java.library.path (is this the same as the PATH environment variable).

@CircuitRCAY
Copy link

I also get the same error, the problem is that the file jniQt5Core.dll does not exist / is missing.

@freastro
Copy link
Contributor

The jniQt5Core.dll file should be built by JavaCPP during the Maven build. I was using Oracle JDK 1.8 and Qt 5.12. It's probable that some changes are necessary if you want to use a later JDK.

@saudet
Copy link
Member

saudet commented Jun 2, 2020

Binaries for Windows are now available!
Please give it a try with the snapshots:
http://bytedeco.org/builds/

@saudet
Copy link
Member

saudet commented Sep 10, 2020

Binaries for Qt on Windows have released with version 1.5.4. Enjoy!

@saudet saudet closed this as completed Sep 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants