Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » SWT Browser & Mozilla
SWT Browser & Mozilla [message #441201] Wed, 11 August 2004 23:40 Go to next message
hung is currently offline hungFriend
Messages: 117
Registered: July 2009
Senior Member
I have looked at this URL :
http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/plat form-swt-home/faq.html#browserlinux

and it seems like in order to use SWT Browser, we have to have specific
version of Mozilla.

The answer we are trying to find is : does it support Mozilla 1.6 or
LATER. If it's not, is there anything we can do to support it?
(hacking/workaround??) Thanks.
Re: SWT Browser & Mozilla [message #441202 is a reply to message #441201] Thu, 12 August 2004 02:00 Go to previous messageGo to next message
Jan Schulz is currently offline Jan SchulzFriend
Messages: 10
Registered: July 2009
Junior Member
Hallo!

* hvlam <hungvlam@hotmail.com> wrote:
> The answer we are trying to find is : does it support Mozilla 1.6 or
> LATER. If it's not, is there anything we can do to support it?
> (hacking/workaround??) Thanks.

I have build it against mozilla 1.7 (or whatever minor version is
currently in debian unstable). firefox should also work fine, as the
*so files are there too. Haven't tried, though.

When you look inot the platform binary sterter file, you can see how
the libs are figured out and LD_LIBRARY_PATH is set.

Äh, you are asking for te linux answer, aren't you?

Jan
Re: SWT Browser & Mozilla [message #441209 is a reply to message #441202] Thu, 12 August 2004 08:11 Go to previous messageGo to next message
Benjamin Pasero is currently offline Benjamin PaseroFriend
Messages: 337
Registered: July 2009
Senior Member
What SWT version is required to allow Mozilla 1.7 as Browser on Linux? I
was using 3061 and Mozilla 1.6 was the latest, allowed Mozilla version.

> Hallo!

> * hvlam <hungvlam@hotmail.com> wrote:
> > The answer we are trying to find is : does it support Mozilla 1.6 or
> > LATER. If it's not, is there anything we can do to support it?
> > (hacking/workaround??) Thanks.

> I have build it against mozilla 1.7 (or whatever minor version is
> currently in debian unstable). firefox should also work fine, as the
> *so files are there too. Haven't tried, though.

> When you look inot the platform binary sterter file, you can see how
> the libs are figured out and LD_LIBRARY_PATH is set.

> Äh, you are asking for te linux answer, aren't you?

> Jan
Re: SWT Browser & Mozilla [message #441217 is a reply to message #441209] Thu, 12 August 2004 12:54 Go to previous messageGo to next message
Jan Schulz is currently offline Jan SchulzFriend
Messages: 10
Registered: July 2009
Junior Member
Hallo!

* Benjamin Pasero <bpasero@rssowl.org> wrote:
> What SWT version is required to allow Mozilla 1.7 as Browser on Linux? I
> was using 3061 and Mozilla 1.6 was the latest, allowed Mozilla version.

Hm, seems there really is a problem. I have the 3.0 code and it
compiles fine against mozilla 1.7.2. When I run the
snippets, I get this /with mozilla and firefox):

jan@snoopy:/tmp$ LD_LIBRARY_PATH="/usr/lib/mozilla-firefox"
/usr/lib/j2sdk1.4/bin/java -classpath
/usr/share/java/swt3.0-gtk.jar:/usr/share/java/swt-pi3.0-gtk .jar:/usr/share/java/swt3.0-mozilla-gtk.jar:.
-Djava.library.path=/usr/lib/jni Main

(<unknown>:11321): Gtk-WARNING **: gtk_widget_size_allocate(): attempt
to allocate widget with width 40 and height -1

(<unknown>:11321): Gtk-WARNING **: gtk_widget_size_allocate(): attempt
to allocate widget with width 64 and height -1

(<unknown>:11321): Gtk-WARNING **: gtk_widget_size_allocate(): attempt
to allocate widget with width 40 and height -1

(<unknown>:11321): Gtk-WARNING **: gtk_widget_size_allocate(): attempt
to allocate widget with width 60 and height -1

(<unknown>:11321): Gtk-WARNING **: gtk_widget_size_allocate(): attempt
to allocate widget with width 29 and height -1
Exception in thread "main" org.eclipse.swt.SWTError: No more handles
[Unknown mozilla path]
at org.eclipse.swt.SWT.error(SWT.java:2717)
at org.eclipse.swt.browser.Browser.<init>(Browser.java:128)
at Main.main(Main.java:57)

Ok, seems I was mistaken about this...

But this seems to be a very bad thing, as I don't have a 1.{4,5,6}
mozilla anymore :( I wonder which distro actually has...

Jan
Re: SWT Browser & Mozilla [message #441267 is a reply to message #441217] Thu, 12 August 2004 22:29 Go to previous messageGo to next message
Haris Peco is currently offline Haris PecoFriend
Messages: 1072
Registered: July 2009
Senior Member
Jan Schulz wrote:

> Hallo!
>
> * Benjamin Pasero <bpasero@rssowl.org> wrote:
>> What SWT version is required to allow Mozilla 1.7 as Browser on Linux? I
>> was using 3061 and Mozilla 1.6 was the latest, allowed Mozilla version.
>
> Hm, seems there really is a problem. I have the 3.0 code and it
> compiles fine against mozilla 1.7.2. When I run the
> snippets, I get this /with mozilla and firefox):
>
> jan@snoopy:/tmp$ LD_LIBRARY_PATH="/usr/lib/mozilla-firefox"
> /usr/lib/j2sdk1.4/bin/java -classpath
> /usr/share/java/swt3.0-gtk.jar:/usr/share/java/swt-pi3.0-gtk .jar:/usr/share/java/swt3.0-mozilla-gtk.jar:.
> -Djava.library.path=/usr/lib/jni Main
>
> (<unknown>:11321): Gtk-WARNING **: gtk_widget_size_allocate(): attempt
> to allocate widget with width 40 and height -1
>
> (<unknown>:11321): Gtk-WARNING **: gtk_widget_size_allocate(): attempt
> to allocate widget with width 64 and height -1
>
> (<unknown>:11321): Gtk-WARNING **: gtk_widget_size_allocate(): attempt
> to allocate widget with width 40 and height -1
>
> (<unknown>:11321): Gtk-WARNING **: gtk_widget_size_allocate(): attempt
> to allocate widget with width 60 and height -1
>
> (<unknown>:11321): Gtk-WARNING **: gtk_widget_size_allocate(): attempt
> to allocate widget with width 29 and height -1
> Exception in thread "main" org.eclipse.swt.SWTError: No more handles
> [Unknown mozilla path]
> at org.eclipse.swt.SWT.error(SWT.java:2717)
> at org.eclipse.swt.browser.Browser.<init>(Browser.java:128)
> at Main.main(Main.java:57)
>
> Ok, seems I was mistaken about this...
>
> But this seems to be a very bad thing, as I don't have a 1.{4,5,6}
> mozilla anymore :( I wonder which distro actually has...
>
> Jan

I have mozilla 1.6 and 1.7.2 source - swt widget work with 1.6, but don't
work with 1.7.x
I try eclipse 3.0 and eclipse 3.1 cvs before one week

regards
Re: SWT Browser & Mozilla [message #441268 is a reply to message #441267] Thu, 12 August 2004 20:26 Go to previous messageGo to next message
Benjamin Pasero is currently offline Benjamin PaseroFriend
Messages: 337
Registered: July 2009
Senior Member
For the future, SWT really should break the dependancy to the supported
versions of Mozilla. Afaik Mozilla 1.7 API replaces the one from 1.4 and
will be used in future versions of Mozilla. SWT should allow future
Mozilla versions as browser widget.

> Jan Schulz wrote:

> > Hallo!
> >
> > * Benjamin Pasero <bpasero@rssowl.org> wrote:
> >> What SWT version is required to allow Mozilla 1.7 as Browser on Linux? I
> >> was using 3061 and Mozilla 1.6 was the latest, allowed Mozilla version.
> >
> > Hm, seems there really is a problem. I have the 3.0 code and it
> > compiles fine against mozilla 1.7.2. When I run the
> > snippets, I get this /with mozilla and firefox):
> >
> > jan@snoopy:/tmp$ LD_LIBRARY_PATH="/usr/lib/mozilla-firefox"
> > /usr/lib/j2sdk1.4/bin/java -classpath
> >
/usr/share/java/swt3.0-gtk.jar:/usr/share/java/swt-pi3.0-gtk .jar:/usr/share/java/swt3.0-mozilla-gtk.jar:.
> > -Djava.library.path=/usr/lib/jni Main
> >
> > (<unknown>:11321): Gtk-WARNING **: gtk_widget_size_allocate(): attempt
> > to allocate widget with width 40 and height -1
> >
> > (<unknown>:11321): Gtk-WARNING **: gtk_widget_size_allocate(): attempt
> > to allocate widget with width 64 and height -1
> >
> > (<unknown>:11321): Gtk-WARNING **: gtk_widget_size_allocate(): attempt
> > to allocate widget with width 40 and height -1
> >
> > (<unknown>:11321): Gtk-WARNING **: gtk_widget_size_allocate(): attempt
> > to allocate widget with width 60 and height -1
> >
> > (<unknown>:11321): Gtk-WARNING **: gtk_widget_size_allocate(): attempt
> > to allocate widget with width 29 and height -1
> > Exception in thread "main" org.eclipse.swt.SWTError: No more handles
> > [Unknown mozilla path]
> > at org.eclipse.swt.SWT.error(SWT.java:2717)
> > at org.eclipse.swt.browser.Browser.<init>(Browser.java:128)
> > at Main.main(Main.java:57)
> >
> > Ok, seems I was mistaken about this...
> >
> > But this seems to be a very bad thing, as I don't have a 1.{4,5,6}
> > mozilla anymore :( I wonder which distro actually has...
> >
> > Jan

> I have mozilla 1.6 and 1.7.2 source - swt widget work with 1.6, but don't
> work with 1.7.x
> I try eclipse 3.0 and eclipse 3.1 cvs before one week

> regards
Re: SWT Browser & Mozilla [message #441272 is a reply to message #441268] Fri, 13 August 2004 01:19 Go to previous messageGo to next message
Haris Peco is currently offline Haris PecoFriend
Messages: 1072
Registered: July 2009
Senior Member
Benjamin Pasero wrote:

> For the future, SWT really should break the dependancy to the supported
> versions of Mozilla. Afaik Mozilla 1.7 API replaces the one from 1.4 and
> will be used in future versions of Mozilla. SWT should allow future
> Mozilla versions as browser widget.
>
>> Jan Schulz wrote:
>
>> > Hallo!
>> >
>> > * Benjamin Pasero <bpasero@rssowl.org> wrote:
>> >> What SWT version is required to allow Mozilla 1.7 as Browser on Linux?
>> >> I was using 3061 and Mozilla 1.6 was the latest, allowed Mozilla
>> >> version.
>> >
>> > Hm, seems there really is a problem. I have the 3.0 code and it
>> > compiles fine against mozilla 1.7.2. When I run the
>> > snippets, I get this /with mozilla and firefox):
>> >
>> > jan@snoopy:/tmp$ LD_LIBRARY_PATH="/usr/lib/mozilla-firefox"
>> > /usr/lib/j2sdk1.4/bin/java -classpath
>> >
> /usr/share/java/swt3.0-gtk.jar:/usr/share/java/swt-pi3.0-gtk .jar:/usr/share/java/swt3.0-mozilla-gtk.jar:.
>> > -Djava.library.path=/usr/lib/jni Main
>> >
>> > (<unknown>:11321): Gtk-WARNING **: gtk_widget_size_allocate(): attempt
>> > to allocate widget with width 40 and height -1
>> >
>> > (<unknown>:11321): Gtk-WARNING **: gtk_widget_size_allocate(): attempt
>> > to allocate widget with width 64 and height -1
>> >
>> > (<unknown>:11321): Gtk-WARNING **: gtk_widget_size_allocate(): attempt
>> > to allocate widget with width 40 and height -1
>> >
>> > (<unknown>:11321): Gtk-WARNING **: gtk_widget_size_allocate(): attempt
>> > to allocate widget with width 60 and height -1
>> >
>> > (<unknown>:11321): Gtk-WARNING **: gtk_widget_size_allocate(): attempt
>> > to allocate widget with width 29 and height -1
>> > Exception in thread "main" org.eclipse.swt.SWTError: No more handles
>> > [Unknown mozilla path]
>> > at org.eclipse.swt.SWT.error(SWT.java:2717)
>> > at org.eclipse.swt.browser.Browser.<init>(Browser.java:128)
>> > at Main.main(Main.java:57)
>> >
>> > Ok, seems I was mistaken about this...
>> >
>> > But this seems to be a very bad thing, as I don't have a 1.{4,5,6}
>> > mozilla anymore :( I wonder which distro actually has...
>> >
>> > Jan
>
>> I have mozilla 1.6 and 1.7.2 source - swt widget work with 1.6, but don't
>> work with 1.7.x
>> I try eclipse 3.0 and eclipse 3.1 cvs before one week
>
>> regards
I agree - mozilla xforms is based on 1.7 , too

regards
Re: SWT Browser & Mozilla [message #441386 is a reply to message #441217] Fri, 13 August 2004 14:59 Go to previous messageGo to next message
Christophe Cornu is currently offline Christophe CornuFriend
Messages: 304
Registered: July 2009
Senior Member
Hi,

Jan:
Can you try setting MOZILLA_FIVE_HOME as well as LD_LIBRARY_PATH? That
would explain the "Unknown mozilla path" message. This should get you
going with Mozilla 1.7 if you rebuilt the SWT native library against 1.7.
Firefox does not seem to work for embedding purposes - we were told that's
because it is statically built to save size. If you get further with a
standard firefox build, open a bug report and paste the instructions.
Thanks!

Mozilla 1.7 is not supported in SWT 3.0, only Mozilla 1.4 GTK2 is. 1.5GTK2
and 1.6GTK2 also work. At the moment, the workaround is to do what Jan did
- rebuild the native SWT mozilla library against a Mozilla 1.7 build. The
resulting dll won't work against older Mozilla versions. See bug 61384 to
be notified when Mozilla 1.7 is supported.

Chris
Re: SWT Browser & Mozilla [message #441398 is a reply to message #441386] Fri, 13 August 2004 18:38 Go to previous messageGo to next message
Haris Peco is currently offline Haris PecoFriend
Messages: 1072
Registered: July 2009
Senior Member
I have mozilla 1.7.2 cvs (and mozilla 1.8a3) and eclipse cvs (current)
How I can rebuilt swt libraries with mozilla 1.7
I know set MOZILLA_FIVE_HOME an dLD_LIBRARY_PATH - is it mean that
I have to build eclipse with this environment variables ?

regard
Christophe Cornu wrote:

> Hi,
>
> Jan:
> Can you try setting MOZILLA_FIVE_HOME as well as LD_LIBRARY_PATH? That
> would explain the "Unknown mozilla path" message. This should get you
> going with Mozilla 1.7 if you rebuilt the SWT native library against 1.7.
> Firefox does not seem to work for embedding purposes - we were told that's
> because it is statically built to save size. If you get further with a
> standard firefox build, open a bug report and paste the instructions.
> Thanks!
>
> Mozilla 1.7 is not supported in SWT 3.0, only Mozilla 1.4 GTK2 is. 1.5GTK2
> and 1.6GTK2 also work. At the moment, the workaround is to do what Jan did
> - rebuild the native SWT mozilla library against a Mozilla 1.7 build. The
> resulting dll won't work against older Mozilla versions. See bug 61384 to
> be notified when Mozilla 1.7 is supported.
>
> Chris
Re: SWT Browser & Mozilla [message #441445 is a reply to message #441386] Mon, 16 August 2004 14:07 Go to previous messageGo to next message
Jan Schulz is currently offline Jan SchulzFriend
Messages: 10
Registered: July 2009
Junior Member
Hallo!

* Christophe Cornu <christophe_cornu@ca.ibm.com> wrote:
> Can you try setting MOZILLA_FIVE_HOME as well as LD_LIBRARY_PATH? That
> would explain the "Unknown mozilla path" message.

jan@snoopy:~/tmp$ MOZILLA_FIVE_HOME="/usr/lib/mozilla"
LD_LIBRARY_PATH="/usr/lib/mozilla" /usr/lib/j2sdk1.4/bin/java
-classpath
/usr/share/java/swt3.0-gtk.jar:/usr/share/java/swt-pi3.0-gtk .jar:/usr/share/java/swt3.0-mozilla-gtk.jar:.
-Djava.library.path=/usr/lib/jni Main
[... same warnings with gtk something ...]
INTERNAL ERROR on Browser End: No manager for initializing factory?

System error?:: Success
jan@snoopy:~/tmp$

and no browser widget :(

[using firefox]
> because it is statically built to save size. If you get further with a
> standard firefox build, open a bug report and paste the instructions.

Firefox works out of the box :)

jan@snoopy:~/tmp$ MOZILLA_FIVE_HOME="/usr/lib/mozilla-firefox"
LD_LIBRARY_PATH="/usr/lib/mozilla-firefox" /usr/lib/j2sdk1.4/bin/java
-classpath
/usr/share/java/swt3.0-gtk.jar:/usr/share/java/swt-pi3.0-gtk .jar:/usr/share/java/swt3.0-mozilla-gtk.jar:.
-Djava.library.path=/usr/lib/jni Main
[... same warnings ...]
[Browser widget comes up]

Doing some ldd on firefox-bin and libgtkembedmoz.so shows no real
difference to the mozilla one.

But this is debian sid plus some experimental thingies.

jan@snoopy:~$ apt-cache policy mozilla-firefox mozilla-browser |egrep "\*|^m"
mozilla-firefox:
*** 0.9.3-2 0
mozilla-browser:
*** 2:1.7.2-2 0

Anyway, Thanks for the tipp of setting both varables. Now I can go on
with getting my packages up to date :)

Jan
Re: SWT Browser & Mozilla [message #441448 is a reply to message #441398] Mon, 16 August 2004 14:18 Go to previous messageGo to next message
Jan Schulz is currently offline Jan SchulzFriend
Messages: 10
Registered: July 2009
Junior Member
Hallo!

* snpe <snpe@snpe.co.yu> wrote:
> I have mozilla 1.7.2 cvs (and mozilla 1.8a3) and eclipse cvs (current)
> How I can rebuilt swt libraries with mozilla 1.7
> I know set MOZILLA_FIVE_HOME an dLD_LIBRARY_PATH - is it mean that
> I have to build eclipse with this environment variables ?

See https://bugs.eclipse.org/bugs/show_bug.cgi?id=71636

the debian/stamp-copy-all-together-gtk makefile target copies all gtk
sources together into one dir:

debian/stamp-copy-all-together-gtk:
cd $(BT)/plugins/org.eclipse.swt && mkdir -p gtk_bin && cp -r Eclipse\ $
cp Eclipse\ SWT/common/library/* \
Eclipse\ SWT\ Program/gnome/library/* \
Eclipse\ SWT\ Mozilla/common/library/* \
Eclipse\ SWT\ AWT/gtk/library/* gtk_bin/library
touch debian/stamp-copy-all-together-gtk

I opened Bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=71637 for a
proper configure and makefile for all native parts.

Jan
Re: SWT Browser & Mozilla [message #441512 is a reply to message #441448] Mon, 16 August 2004 18:55 Go to previous message
Haris Peco is currently offline Haris PecoFriend
Messages: 1072
Registered: July 2009
Senior Member
Hello,
It work with mozilla 1.7.2 and eclipse 3.1M1.Thanks

regards
Jan Schulz wrote:

> Hallo!
>
> * snpe <snpe@snpe.co.yu> wrote:
>> I have mozilla 1.7.2 cvs (and mozilla 1.8a3) and eclipse cvs (current)
>> How I can rebuilt swt libraries with mozilla 1.7
>> I know set MOZILLA_FIVE_HOME an dLD_LIBRARY_PATH - is it mean that
>> I have to build eclipse with this environment variables ?
>
> See https://bugs.eclipse.org/bugs/show_bug.cgi?id=71636
>
> the debian/stamp-copy-all-together-gtk makefile target copies all gtk
> sources together into one dir:
>
> debian/stamp-copy-all-together-gtk:
> cd $(BT)/plugins/org.eclipse.swt && mkdir -p gtk_bin && cp -r
> Eclipse\ $ cp Eclipse\ SWT/common/library/* \
> Eclipse\ SWT\ Program/gnome/library/* \
> Eclipse\ SWT\ Mozilla/common/library/* \
> Eclipse\ SWT\ AWT/gtk/library/* gtk_bin/library
> touch debian/stamp-copy-all-together-gtk
>
> I opened Bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=71637 for a
> proper configure and makefile for all native parts.
>
> Jan
Previous Topic:Cannot change background of Button ?
Next Topic:StyledText multiple font support
Goto Forum:
  


Current Time: Fri Mar 29 02:12:28 GMT 2024

Powered by FUDForum. Page generated in 0.02961 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top