我正在尝试在 Linux(ubuntu 18.04)上使用 eclipse MAT 工具并收到以下错误:
root@xxx/var/lib/jenkins/workspace/Heap_Analysis/mat# ./MemoryAnalyzer
Unable to init server: Could not connect: Connection refused
Unable to init server: Could not connect: Connection refused
MemoryAnalyzer: Cannot open display:
MemoryAnalyzer:
An error has occurred. See the log file
/var/lib/jenkins/workspace/Heap_Analysis/mat/configuration/1614805252582.log.
root@xxxx:/var/lib/jenkins/workspace/Heap_Analysis/mat# cat /var/lib/jenkins/workspace/Heap_Analysis/mat/configuration/1614805252582.log
!SESSION 2021-03-03 21:00:52.492 -----------------------------------------------
eclipse.buildId=unknown
java.version=11.0.10
java.vendor=Ubuntu
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en
Command-line arguments: -os linux -ws gtk -arch x86_64
!ENTRY org.eclipse.osgi 4 0 2021-03-03 21:00:53.259
!MESSAGE Application error
!STACK 1
org.eclipse.swt.SWTError: No more handles [gtk_init_check() failed]
at org.eclipse.swt.SWT.error(SWT.java:4749)
at org.eclipse.swt.widgets.Display.createDisplay(Display.java:1130)
at org.eclipse.swt.widgets.Display.create(Display.java:1070)
at org.eclipse.swt.graphics.Device.<init>(Device.java:175)
at org.eclipse.swt.widgets.Display.<init>(Display.java:636)
at org.eclipse.swt.widgets.Display.<init>(Display.java:627)
如果你们知道任何解决问题的方法,将不胜感激。
已经解决了关于 stackoverflow 的所有类似问题以及以下链接: https ://unix.stackexchange.com/questions/94497/org-eclipse-swt-swterror-no-more-handles-gtk-init-check-运行时失败
但没有任何帮助。