Can't load library: swt-osversion-win32-4970r5 #2908
Closed
kwillenson
started this conversation in
General
Replies: 2 comments 1 reply
-
That one DLL is not sufficient. You will probably need these DLLs:
You can also see that the error message mentions the missing |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Exactly what I needed. I had swt-gdip-win32-4970r5.dll and swt-win32-4970r5.dll but not the others. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Issue: on other (non-compile computer) Can't load library: swt-osversion-win32-4970r5
Both computers are running the same program. The java is compiled with
java version "25.0.1" 2025-10-21 LTS
Java(TM) SE Runtime Environment Oracle GraalVM 25.0.1+8.1 (build 25.0.1+8-LTS-jvmci-b01)
Java HotSpot(TM) 64-Bit Server VM Oracle GraalVM 25.0.1+8.1 (build 25.0.1+8-LTS-jvmci-b01, mixed mode, sharing
and the class files are made into an exe using native-image (also from Oracle GraalVM 25.0.1+8.1 ), but this is an SWT problem.
SWT is from
Eclipse SDK
Version: 2025-09 (4.37)
Build id: I20250905-0730
files included in the run environment are:
lib\org.eclipse.swt.win32.win32.x86_64_3.131.0.v20250820-1556.jar
swt-win32-4970r5.dll
In the main() method, I have added (but it does not help)
System.setProperty("swt.disableWindowsVersionCheck", "true"); //$NON-NLS-1$ //$NON-NLS-2$
Compilation computer with sample run
(GUI starts and behaves normally)
Edition Windows 11 Home
Version 24H2
Installed on 11/25/2024
OS build 26100.7462
Experience Windows Feature Experience Pack 1000.26100.275.0
C:\Program Files\LandMentor>LandMentor2020Native.exe --enable-native-access=ALL-UNNAMED
com.neighborhoodinnovations.ui.App.preApp(-1) LandMentor 2020 compiled at 2025-12-19 17:12:50.451
com.neighborhoodinnovations.ui.App.showScreenSize(-1) screenSize 1920, 1080, 96
WARNING: A restricted method in java.lang.System has been called
WARNING: java.lang.System::loadLibrary has been called by org.eclipse.swt.internal.Library in an unnamed module (file:/C:/Program%20Files/LandMentor/LandMentor2020Native.exe)
WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for callers in this module
WARNING: Restricted methods will be blocked in a future release unless native access is enabled
com.neighborhoodinnovations.ui.App.createContents(-1) LandMentor 2020, compiled=2025-12-19 17:12:50.451
version=FULL, id=BC37-E795-C865-AEEF-7C9E-5DBC
started at 2025-12-22 11:06:38.133
com.neighborhoodinnovations.site.setup.Setup.(-1) C:\Users\keith\AppData\Local\LMSetup/default.set exists, now read it
com.neighborhoodinnovations.site.setup.Setup.readExternal(-1) readExternal initialize screenDPI 0
com.neighborhoodinnovations.site.setup.Setup.(-1) fileSetupVersion 20191011 Setup.VERSION_NUMBER 20191011
com.neighborhoodinnovations.site.setup.Setup.setSiteFileHome(-1) Setup.setSiteFileHome C:\Users\keith\AppData\Local\LMSetup
com.neighborhoodinnovations.site.setup.Setup.readExternal(-1) readExternal initialize screenDPI 0
com.neighborhoodinnovations.ui.App.createContents(-1) cleanupEventLogs
com.neighborhoodinnovations.site.setup.Setup.setSiteFileHome(-1) Setup.setSiteFileHome C:\Users\keith
com.neighborhoodinnovations.ui.App.createContents(-1) cleanupEventLogs done
com.neighborhoodinnovations.ui.App.createContents(-1) after verticalDesign 1402
com.neighborhoodinnovations.site.SiteLog.(-1) rafFileName C:\Users\keith\AppData\Local\LMSetup\site1_20251222_1106.evt
com.neighborhoodinnovations.site.Site.load(-1) Site.load(site1)
com.neighborhoodinnovations.site.SiteLog.(-1) rafFileName C:\Users\keith\AppData\Local\LMSetup\site1_20251222_1106.evt
com.neighborhoodinnovations.site.SiteLog.(-1) rafFileName C:\Users\keith\AppData\Local\LMSetup\site_20251222_1106.evt
com.neighborhoodinnovations.site.SiteLog.close(-1) SiteLog.close delete C:\Users\keith\AppData\Local\LMSetup\site_20251222_1106.evt
com.neighborhoodinnovations.site.SiteLog.(-1) rafFileName null
com.neighborhoodinnovations.site.setup.Setup.setSiteFileHome(-1) Setup.setSiteFileHome C:\Users\keith
Other computer with sample run
(GUI does not start)
Edition Windows 11 Home
Version 25H2
Installed on 11/22/2025
OS build 26200.7462
Experience Windows Feature Experience Pack 1000.26100.275.0
C:\Program Files\LandMentor>landmentor2020native.exe --enable-native-access=ALL-UNNAMED
com.neighborhoodinnovations.ui.App.preApp(-1) LandMentor 2020 compiled at 2025-12-19 17:12:50.451
com.neighborhoodinnovations.ui.App.showScreenSize(-1) screenSize 2560, 1440, 96
WARNING: A restricted method in java.lang.System has been called
WARNING: java.lang.System::loadLibrary has been called by org.eclipse.swt.internal.Library in an unnamed module (file:/C:/Program%20Files/LandMentor/LandMentor2020Native.exe)
WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for callers in this module
WARNING: Restricted methods will be blocked in a future release unless native access is enabled
Exception in thread "main" java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
Can't load library: swt-osversion-win32-4970r5 | java.library.path = [C:\Program Files\LandMentor, C:\Windows\system32, C:\Windows, C:\Program Files\Meta Horizon\Support\oculus-runtime, C:\Windows\system32, C:\Windows, C:\Windows\System32\Wbem, C:\Windows\System32\WindowsPowerShell\v1.0, C:\Windows\System32\OpenSSH, C:\Program Files\NVIDIA Corporation\NVIDIA App\NvDLISR, C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common, C:\Program Files\dotnet, C:\Users\ricky\AppData\Local\Microsoft\WindowsApps, ., .]
Can't load library: swt-osversion-win32 | java.library.path = [C:\Program Files\LandMentor, C:\Windows\system32, C:\Windows, C:\Program Files\Meta Horizon\Support\oculus-runtime, C:\Windows\system32, C:\Windows, C:\Windows\System32\Wbem, C:\Windows\System32\WindowsPowerShell\v1.0, C:\Windows\System32\OpenSSH, C:\Program Files\NVIDIA Corporation\NVIDIA App\NvDLISR, C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common, C:\Program Files\dotnet, C:\Users\ricky\AppData\Local\Microsoft\WindowsApps, ., .]
Can't load library: swt-osversion | java.library.path = [C:\Program Files\LandMentor, C:\Windows\system32, C:\Windows, C:\Program Files\Meta Horizon\Support\oculus-runtime, C:\Windows\system32, C:\Windows, C:\Windows\System32\Wbem, C:\Windows\System32\WindowsPowerShell\v1.0, C:\Windows\System32\OpenSSH, C:\Program Files\NVIDIA Corporation\NVIDIA App\NvDLISR, C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common, C:\Program Files\dotnet, C:\Users\ricky\AppData\Local\Microsoft\WindowsApps, ., .]
Can't load library: C:\Users\ricky.swt\lib\win32\x86_64\swt-osversion-win32-4970r5.dll
Can't load library: C:\Users\ricky.swt\lib\win32\x86_64\swt-osversion-win32.dll
Can't load library: C:\Users\ricky.swt\lib\win32\x86_64\swt-osversion.dll
Beta Was this translation helpful? Give feedback.
All reactions