Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » SWT/AWT Incompatibility on Mac OS X
SWT/AWT Incompatibility on Mac OS X [message #444156] Thu, 07 October 2004 22:34 Go to next message
Bob is currently offline BobFriend
Messages: 44
Registered: July 2009
Member
I understand that there is an incompatibility with using SWT and AWT
concurrently on Mac OS X, but
I'm a bit confused why Swing/AWT based apps would have a problem when SWT
itself is not being
used. If the swt-pi.jar and swt.jar files are in /Library/Java/Extensions,
even attempting to start a
Swing based app will fail, despite the fact that SWT is not being used at
all. Removing them fixes the
problem. The question is, what's the workaround? Do I need to embed swt-pi
and swt in my app? What
have others done to work around this?

Bob
Re: SWT/AWT Incompatibility on Mac OS X [message #444159 is a reply to message #444156] Fri, 08 October 2004 04:34 Go to previous messageGo to next message
Brion Vibber is currently offline Brion VibberFriend
Messages: 21
Registered: July 2009
Junior Member
Bob wrote:
> The question is, what's the workaround? Do I need to embed swt-pi
> and swt in my app? What have others done to work around this?

Normally you'd probably include the SWT .jar and .jnilib files in your
application bundle. It's a megabyte or so, but it allows your
application to be self-sufficient and doesn't require the user to go
through a messy installation or uninstallation process.

-- brion vibber (brion @ pobox.com)
Re: SWT/AWT Incompatibility on Mac OS X [message #444203 is a reply to message #444156] Fri, 08 October 2004 14:49 Go to previous messageGo to next message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
That seems really odd to me. How could simply copying a jar file into the
extensions directory attempt to run it? Mac gurus?

"Bob" <gandalf@cal.net> wrote in message news:ck4g9i$k8o$1@eclipse.org...
> I understand that there is an incompatibility with using SWT and AWT
> concurrently on Mac OS X, but
> I'm a bit confused why Swing/AWT based apps would have a problem when SWT
> itself is not being
> used. If the swt-pi.jar and swt.jar files are in /Library/Java/Extensions,
> even attempting to start a
> Swing based app will fail, despite the fact that SWT is not being used at
> all. Removing them fixes the
> problem. The question is, what's the workaround? Do I need to embed swt-pi
> and swt in my app? What
> have others done to work around this?
>
> Bob
>
Re: SWT/AWT Incompatibility on Mac OS X [message #444234 is a reply to message #444203] Sat, 09 October 2004 11:42 Go to previous messageGo to next message
Benjamin Pasero is currently offline Benjamin PaseroFriend
Messages: 337
Registered: July 2009
Senior Member
Well, could'nt it be that there are cinit's from the swt.jar that cause
the problem?

> That seems really odd to me. How could simply copying a jar file into the
> extensions directory attempt to run it? Mac gurus?

> "Bob" <gandalf@cal.net> wrote in message news:ck4g9i$k8o$1@eclipse.org...
> > I understand that there is an incompatibility with using SWT and AWT
> > concurrently on Mac OS X, but
> > I'm a bit confused why Swing/AWT based apps would have a problem when SWT
> > itself is not being
> > used. If the swt-pi.jar and swt.jar files are in /Library/Java/Extensions,
> > even attempting to start a
> > Swing based app will fail, despite the fact that SWT is not being used at
> > all. Removing them fixes the
> > problem. The question is, what's the workaround? Do I need to embed swt-pi
> > and swt in my app? What
> > have others done to work around this?
> >
> > Bob
> >
Re: SWT/AWT Incompatibility on Mac OS X [message #444301 is a reply to message #444234] Mon, 11 October 2004 16:22 Go to previous messageGo to next message
Andre Weinand is currently offline Andre WeinandFriend
Messages: 66
Registered: July 2009
Member
On 9.10.2004 13:42 Uhr, in article ck8iri$2vl$1@eclipse.org, "Benjamin
Pasero" <bpasero@rssowl.org> wrote:

> Well, could'nt it be that there are cinit's from the swt.jar that cause
> the problem?

cinits? Swt.jar just contains *.class files.

I can only imagine that some magic classloader loads any *.jar file in
/Library/Java/Extensions too eagerly. But this is only a guess since
I couldn't reproduce the problem.

--andre
Re: SWT/AWT Incompatibility on Mac OS X [message #444364 is a reply to message #444301] Tue, 12 October 2004 06:26 Go to previous messageGo to next message
Benjamin Pasero is currently offline Benjamin PaseroFriend
Messages: 337
Registered: July 2009
Senior Member
Hm but maybe there are static initializers that are called as soon as
swt.jar is added to the classpath?

> On 9.10.2004 13:42 Uhr, in article ck8iri$2vl$1@eclipse.org, "Benjamin
> Pasero" <bpasero@rssowl.org> wrote:

> > Well, could'nt it be that there are cinit's from the swt.jar that cause
> > the problem?

> cinits? Swt.jar just contains *.class files.

> I can only imagine that some magic classloader loads any *.jar file in
> /Library/Java/Extensions too eagerly. But this is only a guess since
> I couldn't reproduce the problem.

> --andre
Re: SWT/AWT Incompatibility on Mac OS X [message #444435 is a reply to message #444364] Tue, 12 October 2004 16:36 Go to previous messageGo to next message
Andre Weinand is currently offline Andre WeinandFriend
Messages: 66
Registered: July 2009
Member
On 12.10.2004 8:26 Uhr, in article ckfteb$mvn$1@eclipse.org, "Benjamin
Pasero" <bpasero@rssowl.org> wrote:

> Hm but maybe there are static initializers that are called as soon as
> swt.jar is added to the classpath?

No, classes are only loaded (and static initializers are only called) if the
class is needed. A jar on the classpath is not loaded automatically.

To Bob:
I'd suggest to add a "-verbose:class" command line argument to your
application to find out what triggers loading of swt.jar.

--andre
Re: SWT/AWT Incompatibility on Mac OS X [message #444436 is a reply to message #444435] Tue, 12 October 2004 16:45 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

See

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

--
Thanks,
Rich Kulp
Previous Topic:Memory Leak
Next Topic:[PocketPC] Problem with newer SWT versions + thicker line
Goto Forum:
  


Current Time: Mon Oct 19 16:41:32 GMT 2020

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

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

Back to the top