Linux swt browser No more handles Error

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/7130980/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-05 05:47:54  来源:igfitidea点击:

swt browser No more handles Error

javalinuxswtkdearchlinux

提问by Hekmatof

I wrote a simple program. just a CTabFolder and a WelcomTab inherent from CTabItem. I want to fill my WelcomeTab by a browser which render my htmls. at the init() method of WelcomeTab I Create a Browser but when program want to construct it I get this Error

I wrote a simple program. just a CTabFolder and a WelcomTab inherent from CTabItem. I want to fill my WelcomeTab by a browser which render my htmls. at the init() method of WelcomeTab I Create a Browser but when program want to construct it I get this Error

Exception in thread "main" org.eclipse.swt.SWTError: No more handles [Unknown Mozilla path (MOZILLA_FIVE_HOME not set)]
at org.eclipse.swt.SWT.error(Unknown Source)
at org.eclipse.swt.browser.Mozilla.initMozilla(Unknown Source)
at org.eclipse.swt.browser.Mozilla.create(Unknown Source)
at org.eclipse.swt.browser.Browser.<init>(Unknown Source)
at org.hekmatof.Hbook.UI.WelcomeTab.init(WelcomeTab.java:55)
at org.hekmatof.Hbook.UI.WelcomeTab.<init>(WelcomeTab.java:30)

...

...

in addition I Use Eclipse 3.7 on KDE based on Arch-Linux as I searched for this Error everywhere tells about handle limited on threads, but this is simple program with no Font or Image ... to dispose. I think it should be a problem about gain handle from Operation System

in addition I Use Eclipse 3.7 on KDE based on Arch-Linux as I searched for this Error everywhere tells about handle limited on threads, but this is simple program with no Font or Image ... to dispose. I think it should be a problem about gain handle from Operation System

回答by Daber

This problem apparently comes when eclipse is trying to use internal browser or external browser is miss-configured (internal probably use libwebkit-1.0 to render content).

This problem apparently comes when eclipse is trying to use internal browser or external browser is miss-configured (internal probably use libwebkit-1.0 to render content).

Start eclipse go to preferences, ignore error if happens. Type web browser in the search, then pick web browser tab and add your add and mark your favorite browser (in my case chrome)

Start eclipse go to preferences, ignore error if happens. Type web browser in the search, then pick web browser tab and add your add and mark your favorite browser (in my case chrome)

If you use linux you can use which [browser-name] to get path.

If you use linux you can use which [browser-name] to get path.

It helped in my case - good luck

It helped in my case - good luck

回答by eric

This problem comes out when XUL runner version is too high which is not compatible with SWT browser. It has nothing do to with system browser.

This problem comes out when XUL runner version is too high which is not compatible with SWT browser. It has nothing do to with system browser.

回答by Thiha

Take a look at this post: How to set up internal browser for Aptana on Linux

Take a look at this post: How to set up internal browser for Aptana on Linux

Basically, you will need to install XULRunner then edit the eclipse.ini.

Basically, you will need to install XULRunner then edit the eclipse.ini.

After installing xulrunner, adding the following line in the eclipse.ini solved the problem.

After installing xulrunner, adding the following line in the eclipse.ini solved the problem.

-Dorg.eclipse.swt.browser.XULRunnerPath=/opt/eclipse/xulrunner/

-Dorg.eclipse.swt.browser.XULRunnerPath=/opt/eclipse/xulrunner/

回答by Mifas

Install libwebkitgtk

Install libwebkitgtk

sudo apt-get install libwebkitgtk-1.0-0

restart the application. This should work.

restart the application. This should work.