Problem with Swing application plug-in on Mac OS X [message #453844] |
Mon, 11 April 2005 17:01  |
Eclipse User |
|
|
|
I have an existing Swing application that I want to add plug-in capability
to. The near-term plan is to repackage most of it as an Eclipse
application plug-in (extending the org.eclipse.core.runtime.applications
extension point), and other parts as extensions to new extension points
that that plug-in defines.
This works fine on Windows. I can run my new plug-ins with a subset of the
RCP consisting of the org.eclipse.core.runtime and org.eclipse.osgi
plug-ins, either as an Eclipse application from within Eclipse or after
export. However, I have run into a problem on the Macintosh. When I try to
run my application from within Eclipse, the run fails with the console
message:
2005-04-05 13:33:34.475 java[359] Apple AWT Java VM was loaded on first
thread -- can't start AWT.
The error log for the run indicates that a java.lang.InternalError was
thrown in the native java.lang.ClassLoader$NativeLibrary.load method.
How can I fix this? Googling for the error message text shows that this
error occurs when one tries to use both AWT and SWT in the same
application on the Macintosh, but (as far as I know) this is not what I'm
attempting: my application does not use SWT at all.
I posted the above portion of this message to the RCP newsgroup last week,
and Pascal Rapicault suggested that I try removing -XstartOnFirstThread
from my Eclipse Info.plist. I did this, and it didn't help. I get the same
error message when I try to run my application, besides which the change
seems to make the Eclipse user interface intermittently unresponsive.
Thank you,
Harold Mills
Bioacoustics Research Program
Cornell Lab of Ornithology
|
|
|
|
|
Re: Problem with Swing application plug-in on Mac OS X [message #453904 is a reply to message #453862] |
Wed, 13 April 2005 13:23  |
Eclipse User |
|
|
|
If it is running as a plugin, it is running in the same process and has the
interop problem. To track progress on the SWT_AWT on Mac issue, add
yourself to this bug report:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=67384
"Harold Mills" <hgm1@cornell.edu> wrote in message
news:c8eafd8069a0e392e606751e23549704$1@www.eclipse.org...
> Thanks for your reply to my question. My plug-in is an application
> extension. When I create a configuration to run my plug-in as an Eclipse
> application, Eclipse tells me (on the "Plug-ins" tab of the "Run" dialog)
> that the only other required plug-ins are org.eclipse.core.runtime and
> org.eclipse.osgi. So SWT is not required either by my plug-in or by any of
> the Eclipse plug-ins that it requires.
>
> I have assumed that this should make it possible to run my application
> from within Eclipse, just like when I used to run it as a Java application
> before repackaging it as a plug-in. Eclipse presumably runs Java
> applications as separate processes, since it successfully avoids the
> SWT/AWT UI thread problem there. Does it not run Eclipse applications as
> separate processes?
>
> Perhaps Eclipse doees run an Eclipse application as a separate process,
> but always starts Java on the first thread of the process, assuming that
> the application will use SWT. If this is indeed what's happening, is there
> some way to make Eclipse not do it for my application? I see no option in
> the "Run" dialog for specifying this in my configuration.
>
> Harold Mills
> Bioacoustics Research Program
> Cornell Lab of Ornithology
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.04795 seconds