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/libswt-pi4-gtk-4944r26.so
Can’t load library: /home/yasinr2/dev/diffplug/native/swt/libswt-pi4-gtk.so
Can’t load library: /home/yasinr2/dev/diffplug/native/swt/libswt-pi4.so
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(Library.java:348)
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:257)
at org.eclipse.swt.internal.gtk.OS.<clinit>(OS.java:96)
at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:209)
at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:155)
at org.eclipse.swt.widgets.Display.<clinit>(Display.java:165)
at com.diffplug.pane.app.PaneApplication.main(PaneApplication.java:63)

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!