Linux Error After 2.6 Update

I upgraded from Diffplug 2.4 to 2.6 recently and now am receiving errors when running diffplug. I performed the upgrade by removing my diffplug folder entirely, making a new folder, and extracting the 2.6 .tgz in the place where the 2.4 version had been installed.

Error when running Diffplug
Exception in thread “main” java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
Can’t load library: /home/yasinr2/dev/diffplug/native/swt/
Can’t load library: /home/yasinr2/dev/diffplug/native/swt/
Can’t load library: /home/yasinr2/dev/diffplug/native/swt/
no swt-pi4-gtk-4944r26 in java.library.path: [/usr/java/packages/lib, /usr/lib64, /lib64, /lib, /usr/lib]
no swt-pi4-gtk in java.library.path: [/usr/java/packages/lib, /usr/lib64, /lib64, /lib, /usr/lib]
no swt-pi4 in java.library.path: [/usr/java/packages/lib, /usr/lib64, /lib64, /lib, /usr/lib]

at org.eclipse.swt.internal.Library.loadLibrary(
at org.eclipse.swt.internal.Library.loadLibrary(
at org.eclipse.swt.internal.gtk.OS.<clinit>(
at org.eclipse.swt.internal.Converter.wcsToMbcs(
at org.eclipse.swt.internal.Converter.wcsToMbcs(
at org.eclipse.swt.widgets.Display.<clinit>(

Error when running dp
No lockfile found at /home/yasinr2/.diffplug/.lock
Install beacon /home/yasinr2/.diffplug/installBeacon indicates installation at /home/yasinr2/dev/diffplug

I’m not sure if the error is due to my install method, the lockfile or something else.

Sorry for this error. I can’t reproduce on Ubuntu 20. What linux distribution are you running?

The root problem is either:

  1. You have the SWT_GTK4=1 environment variable (unlikely).
  2. For some reason some part of the GTK3 runtime is failing to load, causing an attempt to load GTK4

One possible workaround is sudo apt-get install libswt-gtk-4-java. Another possibility is sudo apt-get install libgtk-3-dev.

Thank you Ned, for the quick reply. The problem went away on its own :man_shrugging: Not sure what, if anything, changed. If I see it again, I will attempt the solutions you proposed - thanks!