SWTException / UnsatisfiedLinkError: Missing swt-gdip-win32-4973r2 library in v3.10.0 Windows Bundled JRE Installer #536
Description
Activity
Seems I'm getting the same error 2 weeks later. I'll roll back to 3.9.3 too. No answer yet from devs?
Confirming on Windows 11 Pro (build 26300), official
ipscan-3.10.0installer with bundled JRE (OpenJDK 25.0.4).Symptom: "Fatal Error: net.azib.ipscan.di.InjectException: Cannot create net.azib.ipscan.gui.MainWindow …" on every start.
Root cause (stderr when started via
jre\bin\java.exe -jar ipscan.exe):Caused by: java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons: no swt-gdip-win32-4973r12 in java.library.path ... Can't load library: %USERPROFILE%\.swt\lib\win32\x86_64\swt-gdip-win32-4973r12.dll at org.eclipse.swt.internal.gdip.Gdip.<clinit>(Gdip.java:21) at org.eclipse.swt.graphics.Device.checkGDIP(Device.java:226)The 3.10.0 jar contains only
swt-win32-4973r12.dllandswt-osversion-win32-4973r12.dll– the gdip DLL is missing (same as #532, excluded inbuild.gradle, fixed by PR #534).Verified workaround: take
swt-gdip-win32-4973r12.dllfromorg.eclipse.swt.win32.win32.x86_64-3.134.0.jar(Maven Central, SHA-1 verified) and put it into%USERPROFILE%\.swt\lib\win32\x86_64\. Theswt-win32-4973r12.dllin that SWT jar is byte-identical (SHA-256) to the one bundled in ipscan 3.10.0, so it is the matching build. After that the app starts normally.Could you please publish an official 3.10.1 with PR #534? Several users are hitting this on every fresh 3.10.0 install.
Confirming on Windows 11 Pro (build 26300), official
ipscan-3.10.0installer with bundled JRE (OpenJDK 25.0.4).Symptom: "Fatal Error: net.azib.ipscan.di.InjectException: Cannot create net.azib.ipscan.gui.MainWindow …" on every start.
Root cause (stderr when started via
jre\bin\java.exe -jar ipscan.exe):Caused by: java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons: no swt-gdip-win32-4973r12 in java.library.path ... Can't load library: %USERPROFILE%\.swt\lib\win32\x86_64\swt-gdip-win32-4973r12.dll at org.eclipse.swt.internal.gdip.Gdip.<clinit>(Gdip.java:21) at org.eclipse.swt.graphics.Device.checkGDIP(Device.java:226)The 3.10.0 jar contains only
swt-win32-4973r12.dllandswt-osversion-win32-4973r12.dll– the gdip DLL is missing (same as #532, excluded inbuild.gradle, fixed by PR #534).Verified workaround: take
swt-gdip-win32-4973r12.dllfromorg.eclipse.swt.win32.win32.x86_64-3.134.0.jar(Maven Central, SHA-1 verified) and put it into%USERPROFILE%\.swt\lib\win32\x86_64\. Theswt-win32-4973r12.dllin that SWT jar is byte-identical (SHA-256) to the one bundled in ipscan 3.10.0, so it is the matching build. After that the app starts normally.Could you please publish an official 3.10.1 with PR #534? Several users are hitting this on every fresh 3.10.0 install.
Hard to believe #532 was closed on a workaround.
Another vote for actually patching this. Verified workaround works, but that's not the point.
Edit: woah bessy why are my comments huge. Oh because you have to highlight THEN hit the code button mybad.
Powershell command for workaround simplicity:# Dfine stuff, or don't I'm not your dad $ver = "3.134.0" $name = "org.eclipse.swt.win32.win32.x86_64-$ver.jar" $base = "https://repo1.maven.org/maven2/org/eclipse/platform/org.eclipse.swt.win32.win32.x86_64/$ver" $jar = "$env:TEMP\$name" # Download jar and checksum Invoke-WebRequest "$base/$name" -OutFile $jar Invoke-WebRequest "$base/$name.sha1" -OutFile "$jar.sha1" # Verify SHA-1 because haxorz like hacxing $expected = (Get-Content "$jar.sha1" -Raw).Trim().Split()[0] $actual = (Get-FileHash $jar -Algorithm SHA1).Hash if ($actual -ne $expected) { throw "SHA-1 mismatch - do not use this file" } "SHA-1 OK" # Extract only the gdip DLL into the SWT cache folder like the run should, I assume Add-Type -AssemblyName System.IO.Compression.FileSystem $dest = "$env:USERPROFILE\.swt\lib\win32\x86_64" New-Item -ItemType Directory -Force $dest | Out-Null $zip = [IO.Compression.ZipFile]::OpenRead($jar) try { $entry = $zip.Entries | Where-Object Name -eq "swt-gdip-win32-4973r12.dll" [IO.Compression.ZipFileExtensions]::ExtractToFile($entry, "$dest\$($entry.Name)", $true) "Extracted to $dest" } finally { $zip.Dispose() }
Describe the bug
When installing Angry IP Scanner version 3.10.0 on Windows (confirmed on Windows 11 x64), the application produces an error notification after scanning:
org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
no swt-gdip-win32-4973r2 in java.library.path: C:\Program Files\Angry IP Scanner\jre\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS; ...
no swt-gdip-win32 in java.library.path: ...
no swt-gdip in java.library.path: ...
Can't load library: C:\Users<Username>.swt\lib\win32\x86_64\swt-gdip-win32-4973r2.dll
Can't load library: C:\Users<Username>.swt\lib\win32\x86_64\swt-gdip-win32.dll
Can't load library: C:\Users<Username>.swt\lib\win32\x86_64\swt-gdip.dll
)
The underlying cause is an UnsatisfiedLinkError looking for a specific version of the GDI+ library (swt-gdip-win32-4973r2).
Upon examining the populated library extraction directory (C:\Users<Username>.swt\lib\win32\x86_64), the file swt-gdip-win32-4973r2.dll is completely missing. Instead, the folder only contains updated r12 variants (swt-win32-4973r12.dll and swt-osversion-win32-4973r12.dll).
Manually copying and renaming the existing r12 file to match the expected r2 name tricks the app into executing, but immediately results in a deeper structural crash:
java.lang.UnsatisfiedLinkError: 'int org.eclipse.swt.internal.gdip.Gdip.GdiplusStartupinput_sizeof 0'.
Downgrading to version 3.9.3 completely resolves the issue, confirming a regression or library packaging mismatch in the 3.10.0 release.
To Reproduce
Expected behavior
Expected program to run and not produce an error notification
Screenshots
If applicable, add screenshots to help explain your problem.
Versions (please copy from the About dialog or complete manually):