当 SWT 加载本机库时,如何将 gtk 更改为 cocona?

How to change gtk to cocona, when SWT load native library?

我不知道为什么 SWT 加载 libswt-gtk-4332.jnilib。我使用 mac os 并使用 Runnable Jar 构建了 SWT/Jface 项目。我 运行 Runnable Jar 但我失败了。输出错误日志。

我在mac执行了:

java -jar -verbose threed-1.0-SNAPSHOT.jar

java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons: 
no swt-gtk-4332 in java.library.path: [/Users/admin/Library/Java/Extensions, /Library/Java/Extensions, /Network/Library/Java/Extensions, /System/Library/Java/Extensions, /usr/lib/java, .]
no swt-gtk in java.library.path: [/Users/admin/Library/Java/Extensions, /Library/Java/Extensions, /Network/Library/Java/Extensions, /System/Library/Java/Extensions, /usr/lib/java, .]
Can't load library: /var/root/.swt/lib/macosx/x86_64/libswt-gtk-4332.jnilib
Can't load library: /var/root/.swt/lib/macosx/x86_64/libswt-gtk.jnilib

at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
at org.eclipse.swt.internal.C.<clinit>(Unknown Source)
at org.eclipse.swt.internal.Converter.wcsToMbcs(Unknown Source)
at org.eclipse.swt.internal.Converter.wcsToMbcs(Unknown Source)
at org.eclipse.swt.widgets.Display.<clinit>(Unknown Source)
at org.eclipse.swt.widgets.Widget.isValidSubclass(Unknown Source)
at org.eclipse.swt.widgets.Decorations.checkSubclass(Unknown Source)
at org.eclipse.swt.widgets.Shell.<init>(Unknown Source)
at org.eclipse.swt.widgets.Shell.<init>(Unknown Source)
at org.eclipse.jface.window.Window.createShell(Window.java:487)
at org.eclipse.jface.window.Window.create(Window.java:430)
at org.eclipse.jface.window.Window.open(Window.java:790)
at PlayerTableTree.run(Application.kt:20)
at ApplicationKt.main(Application.kt:303)
at ApplicationKt.main(Application.kt)

已解决。我使用了 Jzy3d 库。 Jzy3d SWT 注入了 gtk swt ... 感谢@greg-44,你的评论是提示。