PhotonVision / photonvision

PhotonVision is the free, fast, and easy-to-use computer vision solution for the FIRST Robotics Competition.
https://photonvision.org
GNU General Public License v3.0
264 stars 179 forks source link

Exception in thread "main" java.lang.UnsatisfiedLinkError when installing Photonvision on windows PC #775

Open WrenVin opened 1 year ago

WrenVin commented 1 year ago

Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\Users\Beelink1.wpilib\nativecache\windows\x86-64\opencv_java460.dll.93feb5fadcb0f27c6b5c730f727195f4: Can't find dependent libraries at java.base/java.lang.ClassLoader$NativeLibrary.load0(Native Method) at java.base/java.lang.ClassLoader$NativeLibrary.load(ClassLoader.java:2445) at java.base/java.lang.ClassLoader$NativeLibrary.loadLibrary(ClassLoader.java:2501) at java.base/java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2700) at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2630) at java.base/java.lang.Runtime.load0(Runtime.java:768) at java.base/java.lang.System.load(System.java:1837) at edu.wpi.first.util.RuntimeLoader.loadLibrary(RuntimeLoader.java:121) at org.photonvision.common.util.TestUtils.loadLibraries(TestUtils.java:55) at org.photonvision.Main.main(Main.java:299)

I have installed jdk11 and added it to PATH and set the JAVA HOME variables, still don't know what to do

mcm001 commented 1 year ago

Are you sure that's a windows jar file?

WrenVin commented 1 year ago

Yes we are using the windows64 jar file

WrenVin commented 1 year ago

My team never found a solution, we ended up switching to Linux and the install worked fine there

On Sun, Jan 29, 2023, 3:21 PM Sriman Achanta @.***> wrote:

Weird, this lives in a try-catch block https://github.com/PhotonVision/photonvision/blob/master/photon-server/src/main/java/org/photonvision/Main.java#L299, this means that it failed to load the native libraries btw.

— Reply to this email directly, view it on GitHub https://github.com/PhotonVision/photonvision/issues/775#issuecomment-1407772840, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHPWJFHX5GWCYFSCZYIAERTWU3NL5ANCNFSM6AAAAAAUJYAPLI . You are receiving this because you authored the thread.Message ID: @.***>

mcm001 commented 1 year ago

Just confirmed 2023.2.1 works in Windows 10 with openjdk 11.0.7

WrenVin commented 1 year ago

The only difference with mine was using Windows 11

On Sun, Jan 29, 2023, 9:42 PM Matt @.***> wrote:

Just confirmed 2023.2.1 works in Windows 10 with openjdk 11.0.7

— Reply to this email directly, view it on GitHub https://github.com/PhotonVision/photonvision/issues/775#issuecomment-1407950838, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHPWJFFJKFOPQCD3CBTWHJLWU42C3ANCNFSM6AAAAAAUJYAPLI . You are receiving this because you authored the thread.Message ID: @.***>

mdurrani808 commented 1 year ago

I run windows 11 and works for me. Curious what the difference is that's causing the failed load

zholly15 commented 1 year ago

We are also running into this issue on a Windows 11 Machine. Java 11 is installed and we are targeting the 2023.3.0 Jar.

srimanachanta commented 10 months ago

@WrenVin @zholly15 Is this problem still relevant? Try the latest dev build, some changes were made in upstream wpilib gradle tools that improved how opencv is loading