org.eclipse.swt.SWTError:UbuntuでEclipseを実行するとハンドルがなくなりました。 [gtk_init_check() 失敗]

org.eclipse.swt.SWTError:UbuntuでEclipseを実行するとハンドルがなくなりました。 [gtk_init_check() 失敗]

次のコマンドを使用して、Ubuntu VMでEclipseを開こうとします。これを行うと、常に次の例外が発生します。

ubuntu@username-dyn-vm1-48493:~$ eclipse
Eclipse:
An error has occurred. See the log file
/home/ubuntu/.eclipse/org.eclipse.platform_3.8_155965261/configuration/1381367113197.log.

したがって、その特定のログファイルに移動すると、ログに次の内容が表示されます。

ubuntu@username-dyn-vm1-48493:~$ more /home/ubuntu/.eclipse/org.eclipse.platform_3.8_155965261/configuration/1381367113197.log
!SESSION 2013-10-10 01:05:13.088 -----------------------------------------------
eclipse.buildId=debbuild
java.version=1.7.0_25
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Command-line arguments:  -os linux -ws gtk -arch x86_64

!ENTRY org.eclipse.osgi 4 0 2013-10-10 01:05:17.555
!MESSAGE Application error
!STACK 1
org.eclipse.swt.SWTError: No more handles [gtk_init_check() failed]
        at org.eclipse.swt.SWT.error(SWT.java:4387)
        at org.eclipse.swt.widgets.Display.createDisplay(Display.java:914)
        at org.eclipse.swt.widgets.Display.create(Display.java:900)
        at org.eclipse.swt.graphics.Device.<init>(Device.java:156)
        at org.eclipse.swt.widgets.Display.<init>(Display.java:498)
        at org.eclipse.swt.widgets.Display.<init>(Display.java:489)
        at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:716)
        at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:161)
        at org.eclipse.ui.internal.ide.application.IDEApplication.createDisplay(IDEApplication.java:154)
        at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:96)
        at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
        at org.eclipse.equinox.launcher.Main.main(Main.java:1414)

何が間違っているのか知っている人はいますか?または、この問題を解決するにはどうすればよいですか?ありがとうございます..

直す:-

バージョンの詳細は次のとおりです。

ubuntu@username-dyn-vm1-48493:~$ dpkg -l libgtk[0-9]* | grep ^i
ii  libgtk2.0-0:amd64                   2.24.17-0ubuntu2                    amd64        GTK+ graphical user interface library
ii  libgtk2.0-bin                       2.24.17-0ubuntu2                    amd64        programs for the GTK+ graphical user interface library
ii  libgtk2.0-common                    2.24.17-0ubuntu2                    all          common files for the GTK+ graphical user interface library

ベストアンサー1

X アクセスを渡さずに ssh を介して Eclipse を起動しようとすると、このエラーが発生することがあります。つまり、実行するのを忘れたssh -X user@hostか、サーバーエントリForwardX11 yesに含めることを忘れました。~/.ssh/config

技術的には、OPがVMのケースについて質問しているにもかかわらず、Google検索でこの質問を誤って発見できる人にはこの回答を追加しています。

おすすめ記事