ayalshi
Posts: 11
Joined: Mon Oct 26, 2015 12:04 pm

SWT browser with XULRunner

Mon Nov 23, 2015 4:04 pm

hello,

I am making a project for the raspberry and I am using "DJ native swing" browser. this browser uses the SWT browser.

It works on windows and on linux but on the raspberry it throws an exception:

Code: Select all

Caused by: org.eclipse.swt.SWTError: No more handles (java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons: 
	no swt-xulrunner-gtk-4335 in java.library.path
	no swt-xulrunner-gtk in java.library.path
	Can't load library: /usr/lib/jni/libswt-xulrunner-gtk-4335.so
	Can't load library: /usr/lib/jni/libswt-xulrunner-gtk.so
	Can't load library: /root/.swt/lib/linux/arm/libswt-xulrunner-gtk-4335.so
	Can't load library: /root/.swt/lib/linux/arm/libswt-xulrunner-gtk.so
)
I have searched for those files on the raspberry, XULRunner10.0 installation, XULRunner-10.0-dev installation and inside various jar files as swt jars, but I could not find them.
I would be glad if some one have a XULRunner installation that works and an installation guide.
can some one please help me, I would really appreciate it.

User avatar
xranby
Posts: 539
Joined: Sat Mar 03, 2012 10:02 pm
Contact: Website

Re: SWT browser with XULRunner

Tue Nov 24, 2015 1:06 pm

this can possibly be solved by installing the libswt-webkit-gtk-3-jni package.
it contains a possible replacement for the xulrunner to instead use webkit.

https://packages.debian.org/jessie/armh ... i/filelist

Code: Select all

sudo apt-get update
sudo apt-get install libswt-webkit-gtk-3-jni
FAQ how to use webkit
https://www.eclipse.org/swt/faq.php#howusewebkit
Xerxes Rånby @xranby I once had two, then I gave one away. Now both are in use every day!
twitter.com/xranby

ayalshi
Posts: 11
Joined: Mon Oct 26, 2015 12:04 pm

Re: SWT browser with XULRunner

Thu Nov 26, 2015 10:28 am

hello xanbry,

I have tried to use webkit, install webkit and swt-webkit-jni, but then when I run the browser it throws an exception :

Code: Select all

 faild to create chrriis.dj.nativeswing.swtimpl.component.core.NativeWebBrowser 
reason:
org.eclipse.swt.SWTError: no more handles

User avatar
xranby
Posts: 539
Joined: Sat Mar 03, 2012 10:02 pm
Contact: Website

Re: SWT browser with XULRunner

Thu Nov 26, 2015 10:53 am

"org.eclipse.swt.SWTError: no more handles"
According to Eclipse SWT developers
Paul Webster CLA Friend 2013-04-30 12:40:48 EDT

This just means something in your install leaked SWT handles and now you've run out.

To find out what is leaking, you can install sleak and follow the instructions for taking snap shots:http://www.eclipse.org/swt/tools.php

PW
https://bugs.eclipse.org/bugs/show_bug.cgi?id=402983#c2
Xerxes Rånby @xranby I once had two, then I gave one away. Now both are in use every day!
twitter.com/xranby

ayalshi
Posts: 11
Joined: Mon Oct 26, 2015 12:04 pm

Re: SWT browser with XULRunner

Sun Feb 07, 2016 7:13 pm

ok, the DJ native swing does not work on the raspberry. but I managed to make a browser with a simple SWT browser

the solution is as follows:
1. sudo apt-get install libswt-gtk-3-jni libswt-gtk-3-java libswt-webkit-gtk-3-jni libwebkitgtk-1.0-0
2. after include the /usr/share/java/swt-gtk-3.8.jar in the class path.
3. run a simple swt browser app and it will work.

but I still have a bug, when ever I close a browser object and reopen it the java crash..

Return to “Java”