16

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

Isa Hekmat
  • 758
  • 1
  • 7
  • 19

5 Answers5

14

Install libwebkitgtk

sudo apt-get install libwebkitgtk-1.0-0

restart the application. This should work.

KKK
  • 1,652
  • 7
  • 29
  • 49
  • If you are using a 32-bit Eclipse (with a 32-bit JRE) on a 64-bit Linux installation, you need: `sudo apt-get install libwebkitgtk-1.0-0:i386`. Without the `:i386` suffix, it would install the 64-bit libraries of libwebkitgtk, which the 32-bit JRE cannot load. – slowhand Apr 19 '17 at 18:45
  • Work for me using Debian – ramiromd Nov 29 '17 at 21:16
  • It was `sudo apt install libwebkit2gtk-4.0-37` in Ubuntu 20.04 – Alexander Vasiljev May 23 '22 at 05:23
9

It's not about system handles (directly), it's about firefox installation.

Check the SWT FAQ - What do I need to run the SWT Browser inside Eclipse on Linux and SWT Bug 103611 - internet cache didn't work on Linux and especially IBM Support - SWTError: No more handles [Unknown Mozilla path (MOZILLA_FIVE_HOME not set)].

EDIT

For the seconds error message check Eclipse Community Forums - Could not detect registered XULRunner to use and also check if you have correct XULRunner version installed at SWT FAQ - What do I need to run the SWT Browser inside Eclipse on Linux?.

Sorceror
  • 4,835
  • 2
  • 21
  • 35
  • I set my MOZILLA_FIVE_HOME env-var to /usr/lib/xulrunner-6.0 and I get this new Error: No more handles [Could not detect registered XULRunner to use], I use firefox 6.0 and I install xulrunner separately – Isa Hekmat Aug 22 '11 at 11:43
  • @Sorceror I'm getting this error after upgrading to Ubuntu 11.10 Oneiric. I've tried using `export MOZILLA_FIVE_HOME=/usr/lib/firefox-7.0.1` to no avail! :-( – TrinitronX Oct 14 '11 at 21:32
  • 1
    What if I don't have firefox, and instead have chromium? – Coyote21 Jan 29 '12 at 17:33
  • You have same problem with chromium? That's weird, Chromium does not use XUL runner at all.. – Sorceror Jan 31 '12 at 17:15
1

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)

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

It helped in my case - good luck

madabrowski
  • 1,273
  • 14
  • 17
1

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.

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

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

Community
  • 1
  • 1
Thiha
  • 21
  • 1
0

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.

eric
  • 261
  • 1
  • 4
  • 11